Taco Hoekwater wrote:

andrea valle wrote:

It's the same file but I commented out a part of the section dedicated to importing and drawing little notes attached to arrowlines between music fragments. Everything not commented is now displayed: on my machine it seems to be deterministic.


Ok, got it. There is a bug in mp-spec.mp (inside metafun). Because
of a wrapping number, it fails to recognize the fact that there are
embedded specials at all. Attached is an updated version of
mp-spec.mp.

The corrected definition of add_special_signal is:

  vardef add_special_signal = % write the version number
    if (length _global_specials_<>0) or (length _local_specials_ <>0) :
      special ("%%MetaPostSpecials: 1.0 " & decimal _special_signal_ ) ;
    fi ;
  enddef ;

It now tests for "not equal to zero" instead of "larger than zero":
because of all the included files, the string _local_specials_ becomes
longer than the maximum number 'length' can return, so it returns
-32768 instead, and that is of course less than zero.

ok, patched.

i guess that only you could uncover this wrap-around bug -)

(btw, another funny mp issue is in opening a file for a second time (probably due to the non explicit close))

Hans
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to