At 23:45  +0800 2009/05/03, bill lam wrote:
>On Sun, 03 May 2009, Joey K Tuttle wrote:
>>      load 'jmf'
>>      2 map_jmf_ 'x';'palindrome';'';1
>>  |bad file name/access: assert
>>  |   'bad file name/access'    assert fh~:_1
>>      exit 0
>
>I can reproduce this error, try fixing by changing line 345 of jmf.ijs to
>  fh=. >0 { c_open fn;(ro{O_RDWR,O_RDONLY);0
>
>not sured (not interested) for the window branch.
>
>>  iMg5:~ jkt$ #  Note that mod date is unchanged even though time has gone by
>
>Timestamp changed in my debian linux. Is it a problem of mac itself?
>
>--


In my copies (3 different systems) of jmf.ijs, line 345 looks 
unrelated to your above suggestion...

342 if. fad=0 do. 'bad view'assert 0[free fh,mh,0 end.
343
344 if. ro*.0=type do. NB. readonly jmf file
345   had=. allochdr 127
346   (memr fad,0,HS)memw had,0,HS    NB. copy readonly jmf header to memory
347   (aa,~HS+fad-had) memw had,0,2,JINT
348   (,0+1) memw had,HADC,1,JINT    NB. ref count is 1
349 elseif. 0=type do.
350   had=. fad
351   if. 0=validate ts,had do. 'bad jmf header' assert 0[free fh,mh,fad end.
352   aa memw had,HADFLAG,1,JINT
353   if. sn-:'' do.
354     t=. 0
355   else.
356     t=. 10000+ memr had,HADC,1,JINT NB. shared ref count is 
bumped and is not valid
357   end.
358   (,t+1) memw had,HADC,1,JINT    NB. ref count is 1 (except for 
shared, which is bumped)
359 elseif. 1 do.
360   had=. allochdr 127                   NB. allocate header
361   bx=. JBOXED=type
362   hs=. (+/hsize)*asize=. JSIZES {~ JTYPES i. type
363   lshape=. bx}.<.(ts-hs)%(*/tshape)*asize
364   d=. hs+fad-had
365   t=. IF64{2^31 63
366   if. d<-t do. d=. <.d+t
367   elseif. d>:t do. d=. <.t-d
368   end.
369   h=. d,aa,ts,type,1,(*/lshape,tshape),((-.bx)+#tshape),lshape,tshape
370   h memw had,0,(#h),JINT  NB. set header
371 end.

date of my jmf.ijs on all systems:

-rw-r--r--@  1 jkt  admin  14607 Mar  4  2008 jmf.ijs


Interesting observation about mod date - it does fail for me in Mac 
OS and Redhat Linux - but maybe the answer is that there is an 
updated version of jmf.ijs that would explain both things...

- joey
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to