On 15-10-2012 21:42, Andre Caldas wrote:
I don't know when "inputstack" could be empty... but maybe a warning should be issued, and the return value of toppath should be declared undefined. That is, it would be an error to call toppath if "inputstack" is empty.
you should test \component x.tex \component y.tex and see if when y is loaded we can still get the right path
1. check for "stack underflow"; and/or
such things are dealt with
2. check if the file "somefile.tex" exists in the directory being popped from the stack. Just for "bug catching"...
it all happens before a file is loaded so the normal reporting is applied 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 -----------------------------------------------------------------