On Wed, Jun 04, 2025 at 03:53:41PM +0100, Gavin Smith wrote: > On Wed, Jun 04, 2025 at 12:21:52AM +0200, Patrice Dumas wrote: > > On Fri, May 30, 2025 at 05:38:10PM +0100, Gavin Smith wrote: > > > 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. > > > > In C, the structuring code is called by tta/C/convert/texinfo.c > > txi_complete_document, with an interface that allows to determine > > flexibly what structuring code is run. There is no equivalent function > > in Perl, in the comment the reason is because "the modules are loaded on > > demand, which makes doing a similar function impossible" (I do not know > > if this explanation is so good, though). > > It doesn't really make sense to me, as I though that C/convert/texinfo.c > would be the analogue of perl/Texinfo/Convert/Texinfo.pm for converting > to the Texinfo format,
It is, the difference is in the implementation. Here, in C there is a function with flags in input that calls all the structuring functions, in Perl there is no function, but a series of if (both in texi2any.pl and t/test_utils.pl) because the analogous function that could be in Transformations.pm cannot be used as Transformations.pm may not be loaded. > but I don't mind as long as I haven't inadvertently > introduced an error into the code with my changes by failing to update > all the C code correctly. You did right, you modified correctly the C function too. -- Pat