From e5fe861660d5cf60cfeb67f7e57f659b309e9613 Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 8 Jun 2011 20:40:24 +0300 Subject: beta 2011.06.08 19:06 --- tex/generic/context/luatex-basics.tex | 2 +- tex/generic/context/luatex-fonts-merged.lua | 36 ++++++++++++++++++++++++++--- tex/generic/context/luatex-fonts.tex | 2 +- tex/generic/context/luatex-mplib.tex | 2 +- tex/generic/context/luatex-preprocessor.tex | 2 +- tex/generic/context/luatex-test.tex | 2 +- tex/generic/context/m-metapo.tex | 2 +- tex/generic/context/mptopdf.tex | 2 +- 8 files changed, 40 insertions(+), 10 deletions(-) (limited to 'tex/generic') diff --git a/tex/generic/context/luatex-basics.tex b/tex/generic/context/luatex-basics.tex index 8308204d5..bb34587ff 100644 --- a/tex/generic/context/luatex-basics.tex +++ b/tex/generic/context/luatex-basics.tex @@ -5,7 +5,7 @@ %D subtitle=Attribute Allocation, %D author=Hans Hagen, %D date=\currentdate, -%D copyright=public domain] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %D As soon as we feel the need this file will file will contain an extension %D to the standard plain register allocation. For the moment we stick to a diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 3036e2f81..a826b33f0 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/18/11 22:26:32 +-- merge date : 06/08/11 19:06:42 do -- begin closure to overcome local limits and interference @@ -1855,9 +1855,39 @@ end --~ print(file.join("http:///a","/y")) --~ print(file.join("//nas-1","/y")) +-- We should be able to use: +-- +-- function file.is_writable(name) +-- local a = attributes(name) or attributes(dirname(name,".")) +-- return a and sub(a.permissions,2,2) == "w" +-- end +-- +-- But after some testing Taco and I came up with: + function file.is_writable(name) - local a = attributes(name) or attributes(dirname(name,".")) - return a and sub(a.permissions,2,2) == "w" + if lfs.isdir(name) then + name = name .. "/m_t_x_t_e_s_t.tmp" + local f = io.open(name,"wb") + if f then + f:close() + os.remove(name) + return true + end + elseif lfs.isfile(name) then + local f = io.open(name,"ab") + if f then + f:close() + return true + end + else + local f = io.open(name,"ab") + if f then + f:close() + os.remove(name) + return true + end + end + return false end function file.is_readable(name) diff --git a/tex/generic/context/luatex-fonts.tex b/tex/generic/context/luatex-fonts.tex index 8ccc9f3d5..a7c8bc2b8 100644 --- a/tex/generic/context/luatex-fonts.tex +++ b/tex/generic/context/luatex-fonts.tex @@ -4,7 +4,7 @@ %D title=\LUATEX\ Support Macros, %D subtitle=Generic \OPENTYPE\ Font Handler, %D author=Hans Hagen, -%D copyright=see context related readme files] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %D \subject{Welcome} %D diff --git a/tex/generic/context/luatex-mplib.tex b/tex/generic/context/luatex-mplib.tex index 691958646..ef6dfff95 100644 --- a/tex/generic/context/luatex-mplib.tex +++ b/tex/generic/context/luatex-mplib.tex @@ -4,7 +4,7 @@ %D title=\LUATEX\ Support Macros, %D subtitle=\METAPOST\ to \PDF\ conversion, %D author=Taco Hoekwater \& Hans Hagen, -%D copyright=see context related readme files] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %D This is the companion to the \LUA\ module \type {supp-mpl.lua}. Further %D embedding is up to others. A simple example of usage in plain \TEX\ is: diff --git a/tex/generic/context/luatex-preprocessor.tex b/tex/generic/context/luatex-preprocessor.tex index fe4872d61..03b483f41 100644 --- a/tex/generic/context/luatex-preprocessor.tex +++ b/tex/generic/context/luatex-preprocessor.tex @@ -4,7 +4,7 @@ %D title=\LUATEX\ Support Macros, %D subtitle=Generic Preprocessor, %D author=Hans Hagen, -%D copyright=public domain] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] \directlua{dofile(kpse.find_file('luatex-preprocessor.lua'))} diff --git a/tex/generic/context/luatex-test.tex b/tex/generic/context/luatex-test.tex index 1c3aeb1b6..830d30a91 100644 --- a/tex/generic/context/luatex-test.tex +++ b/tex/generic/context/luatex-test.tex @@ -5,7 +5,7 @@ %D subtitle=Simple Test File, %D author=Hans Hagen, %D date=\currentdate, -%D copyright=public domain] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %D See \type {luatex-plain.tex} (or on my machine \type {luatex.tex} %D for how to make a format. diff --git a/tex/generic/context/m-metapo.tex b/tex/generic/context/m-metapo.tex index 8680f69c6..f02830a13 100644 --- a/tex/generic/context/m-metapo.tex +++ b/tex/generic/context/m-metapo.tex @@ -5,7 +5,7 @@ %D subtitle=\METAPOST\ Inclusion, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ distribution and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for diff --git a/tex/generic/context/mptopdf.tex b/tex/generic/context/mptopdf.tex index a0ac34a42..3efe57392 100644 --- a/tex/generic/context/mptopdf.tex +++ b/tex/generic/context/mptopdf.tex @@ -5,7 +5,7 @@ %D subtitle=conversion to \PDF, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for -- cgit v1.2.3