On Wed, May 28, 2025 at 09:33:39PM +0100, Gavin Smith wrote:
> > > What I would like to change, as a preliminary step before trying to
> > > find better ways of reporting on problems with the node structure,
> > > is to completely separate:
> > > 
> > > * Structure checking and warning code
> > > * Code altering the structure.
> > 
> > Looks good to me.  The codes are not that dependent, it just reuse a
> > loop.  As it is designed now, the checks must be after determining menu
> > directions, as you remarked, but there are no dependency the other ay
> > around as far as I can tell.
> 
> I've got the change at the bottom of this mail.  The structure checking
> comes before the structure modification, otherwise one of the warnings
> is not made.  I've moved structure checking code, copied the main loop
> over the nodes, then combined conditional blocks where possible.
> 
> ...
> 
> In the next two or three days, I'll try to do the corresponding change
> in the C code.  Then I'll look at splitting out the structure-checking
> code into its own function...

I've done this.  I noticed that complete_node_tree_with_menus it was
not run from C/texi2any.c, but some of this looks quite different to
perl/texi2any.pl so presumably it is on purpose.

> ... before looking at how this code could be
> reformed or rewritten.

I haven't done this yet.

Reply via email to