Am 16.04.2007 um 16:53 schrieb Abdelrazak Younes:

Stefan Schimanski wrote:
Hi!
Here is a proposal to fix the crash when you try to define macros with self references, i.e. by using \foo inside of the definition of \foo itself (or by any other definitional loop):
  http://bugzilla.lyx.org/attachment.cgi?id=1548&action=view
It basically implements a locking counter in MacroData which is increased before drawing an expanded macro and decreased afterwards. Moreover inside of the arguments of the macro the counter is temporarily decreased as those cases do not count as a loop. Any self reference is rendered as "Self reference: foo". Maybe not the most elegant solution, but it does the job until another clean implementation of the macros is available.

What do you think Andre'?

Abdel.


I was thinking about tracking the dependency graph of used macros in a macro definition and look for loops. Then return a harmless MathMacro with some error string in that case. But that would probably be much more complicated. I don't see it as a long term fix anyway as the macros need a proper reimplementation.

Schimmi

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to