[latex3-commits] [git/LaTeX3-latex3-lualibs] main, new-libs: Update merged packages (3643080)

Marcel Fabian Krüger tex at 2krueger.de
Tue Oct 4 17:17:58 CEST 2022


Repository : https://github.com/latex3/lualibs
On branches: main,new-libs
Link       : https://github.com/latex3/lualibs/commit/364308010365be1c43d672bb49b54355f98340fc

>---------------------------------------------------------------

commit 364308010365be1c43d672bb49b54355f98340fc
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Tue Oct 4 17:17:58 2022 +0200

    Update merged packages


>---------------------------------------------------------------

364308010365be1c43d672bb49b54355f98340fc
 CTANREADME.md               |  4 +--
 NEWS                        |  4 +--
 README.md                   |  4 +--
 build.lua                   |  4 +--
 import-from-context.lua     |  0
 lualibs-basic-merged.lua    | 12 ++++++---
 lualibs-extended-merged.lua | 59 ++++++++++++++++++++++++++++++++++++++++++---
 lualibs.dtx                 | 12 ++++-----
 8 files changed, 78 insertions(+), 21 deletions(-)

diff --git a/CTANREADME.md b/CTANREADME.md
index 8e9dc57..0919411 100644
--- a/CTANREADME.md
+++ b/CTANREADME.md
@@ -2,9 +2,9 @@
 
 VERSION: 2.75
 
-DATE: 2022-03-12
+DATE: 2022-10-04
 
-FONTLOADERDATE: 2022-03-12
+FONTLOADERDATE: 2022-10-04
 
 Lualibs is a collection of Lua modules useful for general programming.
 
diff --git a/NEWS b/NEWS
index b6dc692..889232d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
                         History of the lualibs package
-2021/03/12 v2.75/
-    * sync with Context current as of 2021/03/12.
+2022/10/04 v2.75/
+    * sync with Context current as of 2022/10/04.
     * add util-sac
     * Replace l-gzip with util-zip
 
diff --git a/README.md b/README.md
index e527831..c99a3ee 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # The Lualibs Package
 
 ![Version: 2.75](https://img.shields.io/badge/current_version-2.75-blue.svg?style=flat-square)
-![Date: 2022-03-12](https://img.shields.io/badge/date-2022--03--12-blue.svg?style=flat-square)
+![Date: 2022-10-04](https://img.shields.io/badge/date-2022--10--04-blue.svg?style=flat-square)
 [![License: GNU GPLv2](https://img.shields.io/badge/license-GNU_GPLv2-blue.svg?style=flat-square)](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 
 
@@ -15,7 +15,7 @@ This package has been developed by the LuaLaTeX development team on
 <http://github.com/lualatex/lualibs>. 
 
 The current version has been build by the LaTeX3 Project Team on
-<https://github.com/latex3/lualibs/> from context 2022-03-12. 
+<https://github.com/latex3/lualibs/> from context 2022-10-04. 
 
 Please see the documentation lualibs.pdf for more information.
 
diff --git a/build.lua b/build.lua
index 10869e2..9b5f25d 100644
--- a/build.lua
+++ b/build.lua
@@ -1,7 +1,7 @@
 -- Build script for lualibs
 packageversion= "2.75"
-packagedate= "2022-03-12"
-fontloaderdate= "2022-03-12" -- only as record.
+packagedate= "2022-10-04"
+fontloaderdate= "2022-10-04" -- only as record.
 
 module   = "lualibs"
 ctanpkg  = "lualibs"
diff --git a/import-from-context.lua b/import-from-context.lua
old mode 100644
new mode 100755
diff --git a/lualibs-basic-merged.lua b/lualibs-basic-merged.lua
index c7fa794..690a316 100644
--- a/lualibs-basic-merged.lua
+++ b/lualibs-basic-merged.lua
@@ -1,6 +1,6 @@
 -- merged file : lualibs-basic-merged.lua
 -- parent file : lualibs-basic.lua
--- merge date  : 2022-03-12 14:16
+-- merge date  : 2022-10-04 17:16
 
 do -- begin closure to overcome local limits and interference
 
@@ -2737,8 +2737,14 @@ if not math.ceiling then
  math.ceiling=math.ceil
 end
 if not math.round then
- local floor=math.floor
- function math.round(x) return floor(x+0.5) end
+ if xmath then
+  math.round=xmath.round
+ else
+  local floor=math.floor
+  function math.round(x)
+   return x<0 and -floor(-x+0.5) or floor(x+0.5)
+  end
+ end
 end
 if not math.div then
  local floor=math.floor
diff --git a/lualibs-extended-merged.lua b/lualibs-extended-merged.lua
index 9486b83..08428c5 100644
--- a/lualibs-extended-merged.lua
+++ b/lualibs-extended-merged.lua
@@ -1,6 +1,6 @@
 -- merged file : lualibs-extended-merged.lua
 -- parent file : lualibs-extended.lua
--- merge date  : 2022-03-12 14:16
+-- merge date  : 2022-10-04 17:16
 
 do -- begin closure to overcome local limits and interference
 
@@ -2487,6 +2487,21 @@ function table.ordered(t)
   return function() end
  end
 end
+function combine(target,source)
+ if target then
+  for k,v in next,source do
+   if type(v)=="table" then
+      target[k]=combine(target[k],source[k])
+   else
+      target[k]=v
+   end
+  end
+  return target
+ else
+  return source
+ end
+end
+table.combine=combine
 
 end -- closure
 
@@ -3131,9 +3146,18 @@ local endofstring=lpegpatterns.endofstring
 local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1
 local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+(P("*")+endofstring)*Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1*endofstring 
 function parsers.stepper(str,n,action)
+ local ts=type(str)
  if type(n)=="function" then
-  lpegmatch(stepper,str,1,false,n or print)
- else
+  if ts=="number" then
+   n(str)
+  elseif ts=="table" then
+   for i=1,#str do
+    n(str[i])
+   end
+  else
+   lpegmatch(stepper,str,1,false,n or print)
+  end
+ elseif ts=="string" then
   lpegmatch(stepper,str,1,n,action or print)
  end
 end
@@ -3231,8 +3255,11 @@ local p_year=lpegpatterns.digit^4/tonumber
 local pattern=Cf(Ct("")*(
   (Cg(Cc("year")*p_year)*S("-/")*Cg(Cc("month")*cardinal)*S("-/")*Cg(Cc("day")*cardinal)
   )+(Cg(Cc("day")*cardinal)*S("-/")*Cg(Cc("month")*cardinal)*S("-/")*Cg(Cc("year")*p_year)
+  )+(Cg(Cc("year")*p_year)*S("-/")*Cg(Cc("month")*cardinal)
+  )+(Cg(Cc("month")*cardinal)*S("-/")*Cg(Cc("year")*p_year)
   )
- )*P(" ")*Cg(Cc("hour")*cardinal)*P(":")*Cg(Cc("min")*cardinal)*(P(":")*Cg(Cc("sec")*cardinal))^-1
+ )*(
+   P(" ")*Cg(Cc("hour")*cardinal)*P(":")*Cg(Cc("min")*cardinal)*(P(":")*Cg(Cc("sec")*cardinal))^-1+P(-1) )
 ,rawset)
 lpegpatterns.splittime=pattern
 function parsers.totime(str)
@@ -3646,6 +3673,8 @@ do
        k=lpegmatch(escaper,k) or k
        v=lpegmatch(escaper,v) or v
        n=n+1 t[n]=f_key_val_str(depth,k,v)
+      elseif i>1 then
+       n=n-1
       end
      elseif tv=="table" then
       local l=#v
@@ -3661,6 +3690,8 @@ do
        end
       elseif next(v) then
        tojsonpp(v,k,depth,level+1,0)
+      elseif i>1 then
+       n=n-1
       end
      elseif tv=="boolean" then
       if tk=="number" then
@@ -3678,6 +3709,8 @@ do
        else
         t[n]=f_key_val_nop(depth,k)
        end
+      elseif i>1 then
+       n=n-1
       end
      else
       if tk=="number" then
@@ -3687,6 +3720,8 @@ do
        k=lpegmatch(escaper,k) or k
        n=n+1
        t[n]=f_key_val_null(depth,k)
+      elseif i>1 then
+       n=n-1
       end
      end
     end
@@ -4517,6 +4552,22 @@ local function showtraceback(rep)
  end
 end
 debugger.showtraceback=showtraceback
+if luac then
+ local show,dump=luac.print,string.dump
+ function luac.inspect(v)
+  if type(v)=="function" then
+   local ok,str=xpcall(dump,function() end,v)
+   if ok then
+    v=str
+   end
+  end
+  if type(v)=="string" then
+   show(v,true)
+  else
+   print(v)
+  end
+ end
+end
 
 end -- closure
 
diff --git a/lualibs.dtx b/lualibs.dtx
index 4061d8b..7dcc1ff 100644
--- a/lualibs.dtx
+++ b/lualibs.dtx
@@ -37,7 +37,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: lualibs 2022-03-12 v2.75 Lua additional functions.}
+\Msg{* Package: lualibs 2022-10-04 v2.75 Lua additional functions.}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -107,7 +107,7 @@ and lualibs-extended.lua.
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{lualibs.drv}
-  [2022/03/12 v2.75 Lua Libraries.]
+  [2022/10/04 v2.75 Lua Libraries.]
 \documentclass{ltxdoc}
 \usepackage{fancyvrb,xspace}
 \usepackage[x11names]{xcolor}
@@ -207,7 +207,7 @@ and lualibs-extended.lua.
 % \GetFileInfo{lualibs.drv}
 %
 % \title{The \identifier{lualibs} package}
-% \date{2022/03/12 v2.75}
+% \date{2022/10/04 v2.75}
 % \author{Élie Roux      · \email{elie.roux at telecom-bretagne.eu}\\
 %         Philipp Gesang · \email{phg at phi-gamma.net}\\
 %         The \LaTeX{} Project · \email{https://github.com/latex3/lualibs/}\\
@@ -430,7 +430,7 @@ lualibs = lualibs or { }
 lualibs.module_info = {
   name          = "lualibs",
   version       = "2.75",       --TAGVERSION
-    date        = "2022-03-12", --TAGDATE
+    date        = "2022-10-04", --TAGDATE
   description   = "ConTeXt Lua standard libraries.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",
@@ -584,7 +584,7 @@ local loadmodule        = lualibs.loadmodule
 local lualibs_basic_module = {
   name          = "lualibs-basic",
   version       = "2.75",       --TAGVERSION
-  date          = "2022-03-12", --TAGDATE
+  date          = "2022-10-04", --TAGDATE
   description   = "ConTeXt Lua libraries -- basic collection.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",
@@ -665,7 +665,7 @@ lualibs = lualibs or { }
 local lualibs_extended_module = {
   name          = "lualibs-extended",
   version       = "2.75",       --TAGVERSION
-  date          = "2022-03-12", --TAGDATE
+  date          = "2022-10-04", --TAGDATE
   description   = "ConTeXt Lua libraries -- extended collection.",
   author        = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
   copyright     = "PRAGMA ADE / ConTeXt Development Team",





More information about the latex3-commits mailing list.