Re: [dev-context] --iftouched not working

2011-06-16 Thread Hans Hagen

On 16-6-2011 12:01, Aditya Mahajan wrote:

Hi,

mtxrun --iftouched does not work. The reason is that line 147000 of
mtxrun.lua has

local oldname, newname = string.split(touchname, ,)

This sets oldname to be equal to a table and newname to nil.
Consequently, the next test

if oldname and newname and oldname ~=  and newname ~=  then

fails. An easy fix is to wrap string.split inside a unpack.

local oldname, newname = unwrap(string.split(touchname, ,))

but there might be more canonical ways of fixing this.


I've made a string.splitup(str,,) for this (saves a temp table).

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] --iftouched not working

2011-06-15 Thread Aditya Mahajan

Hi,

mtxrun --iftouched does not work. The reason is that line 147000 of 
mtxrun.lua has


local oldname, newname = string.split(touchname, ,)

This sets oldname to be equal to a table and newname to nil. Consequently, 
the next test


if oldname and newname and oldname ~=  and newname ~=  then

fails. An easy fix is to wrap string.split inside a unpack.

local oldname, newname = unwrap(string.split(touchname, ,))

but there might be more canonical ways of fixing this.

Aditya


___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context