texlive[64508]

commits+karl at tug.org commits+karl at tug.org
Sun Sep 25 22:14:42 CEST 2022


Revision: 64508
          http://tug.org/svn/texlive?view=revision&revision=64508
Author:   karl
Date:     2022-09-25 22:14:42 +0200 (Sun, 25 Sep 2022)
Log Message:
-----------
luatruthtable (25sep22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/lualatex/luatruthtable/luatruthtable.sty

Modified: trunk/Master/texmf-dist/tex/lualatex/luatruthtable/luatruthtable.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luatruthtable/luatruthtable.sty	2022-09-25 20:14:15 UTC (rev 64507)
+++ trunk/Master/texmf-dist/tex/lualatex/luatruthtable/luatruthtable.sty	2022-09-25 20:14:42 UTC (rev 64508)
@@ -1,9 +1,9 @@
 % luaset package
-% version 1.0
+% version 1.1
 % Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt.
 %Authors: Chetan Shirore and Dr. Ajit Kumar
 
-\ProvidesPackage{luatruthtable}[1.0]
+\ProvidesPackage{luatruthtable}[1.1]
 \RequirePackage{xkeyval}
 \RequirePackage{amsmath}
 \RequirePackage{luacode}
@@ -42,14 +42,18 @@
 
 local tmp1 = {}
 local logand = {}
+local v1 = 0
 
 local and_mt= {
   __mul = function(a,b)
     if b==logand then
-      tmp1[1]=a
+    	v1 = v1 + 1 
+      tmp1[v1]=a
       return tmp1
     elseif a == tmp1 then
-      return _and(tmp1[1], b)
+      local w1 = _and(tmp1[v1], b)
+      v1 = v1 - 1
+		return w1
     end
   end
 }
@@ -65,14 +69,18 @@
 
 local tmp2 = {}
 local logor = {}
+local v2 = 0
 
 local or_mt= {
   __mul = function(a,b)
     if b==logor then
-      tmp2[1]=a
+    	 v2 = v2 + 1 
+      tmp2[v2] = a
       return tmp2
     elseif a == tmp2 then
-      return _or(tmp2[1], b)
+      local w2 =  _or(tmp2[v2], b)
+      v2 = v2 - 1
+		return w2
     end
   end
 }
@@ -88,14 +96,18 @@
 
 local tmp3 = {}
 local imp = {}
+local v3 = 0
 
 local imp_mt= {
   __mul = function(a,b)
     if b==imp then
-      tmp3[1]=a
+		 v3 = v3 + 1
+      tmp3[v3]=a
       return tmp3
     elseif a == tmp3 then
-      return _imp(tmp3[1], b)
+      local w3 =  _imp(tmp3[v3], b)
+      v3 = v3 - 1
+		return w3
     end
   end
 }
@@ -111,14 +123,18 @@
 
 local tmp4 = {}
 local iff = {}
+local v4 = 0
 
 local iff_mt= {
   __mul = function(a,b)
     if b==iff then
-      tmp4[1]=a
+     v4 = v4 + 1 
+      tmp4[v4]=a
       return tmp4
     elseif a == tmp4 then
-      return _iff(tmp4[1], b)
+      local w4 = _iff(tmp4[v4], b)
+      v4 = v4 - 1
+		return w4
     end
   end
 }
@@ -134,14 +150,18 @@
 
 local tmp5 = {}
 local logxor = {}
+local v5 = 0
 
 local xor_mt= {
   __mul = function(a,b)
     if b==logxor then
-      tmp5[1]=a
+     v5 = v5 + 1 
+      tmp5[v5]=a
       return tmp5
     elseif a == tmp5 then
-      return _xor(tmp5[1], b)
+      local w5 = _xor(tmp5[v5], b)
+      v5 = v5 - 1
+		return w5
     end
   end
 }
@@ -157,14 +177,18 @@
 
 local tmp6 = {}
 local lognand = {}
+local v6 = 0
 
 local nand_mt= {
   __mul = function(a,b)
     if b==lognand then
-      tmp6[1]=a
+		 v6 = v6 + 1 
+      tmp6[v6]=a
       return tmp6
     elseif a == tmp6 then
-      return _nand(tmp6[1], b)
+      local w6 =  _nand(tmp6[v6], b)
+      v6 = v6 - 1
+		return w6
     end
   end
 }
@@ -180,14 +204,18 @@
 
 local tmp7 = {}
 local lognor = {}
+local v7 = 0
 
 local nor_mt= {
   __mul = function(a,b)
     if b==lognor then
-      tmp7[1]=a
+	   v7 = v7 + 1 
+      tmp7[v7]=a
       return tmp7
     elseif a == tmp7 then
-      return _nor(tmp7[1], b)
+      local w7 = _nor(tmp7[v7], b)
+		 v7 = v7 - 1
+		return w7
     end
   end
 }
@@ -203,14 +231,18 @@
 
 local tmp8 = {}
 local logxnor = {}
+local v8 = 0
 
 local xnor_mt= {
   __mul = function(a,b)
     if b==logxnor then
-      tmp8[1]=a
+      v8 = v8 + 1 
+      tmp8[v8]=a
       return tmp8
     elseif a == tmp8 then
-      return _xnor(tmp8[1], b)
+     local w8 =  _xnor(tmp8[v8], b)
+     v8 = v8 - 1
+		return w8
     end
   end
 }



More information about the tex-live-commits mailing list.