2024-12-23 Gavin Smith 7.2 * NEWS: version and date. 2024-12-23 Gavin Smith * tp/maintain/regenerate_documentlanguages-loc.pl: Exclude duplicate country codes as both Denmark and the Kingdom of Denmark have the same code. 2024-12-22 Gavin Smith * man/info.5, man/texinfo.5: 2024. 2024-12-22 Gavin Smith * INSTALL: mention --enable-xs-perl-libintl for musl. From Patrice. * README-hacking: reminder to check configure flags in INSTALL 2024-12-20 Gavin Smith * doc/texinfo.texi (Customization Variables and Options): Place options in alphabetical order. 2024-12-20 Gavin Smith * doc/texinfo.texi (HTML Customization Variables List): Change @vtable to @table to avoid duplicate index entries for customization variables. 2024-12-20 Gavin Smith * doc/texinfo.texi (HTML Output Structure Customization): Add USE_NODE_DIRECTIONS as this is only documented in "HTML Customization Variables List". (HTML Customization Variables List) : Fix punctuation. 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (Test of macros with @ in index): Enable section as we now use @ in index files. 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (Nested URL, URL): rename and move earlier. 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (Test of characters in section title): Move nearer end of file. 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (Code quote): Label examples. 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (@set and @value, Copying): Show expected results. 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (Cross-references, Test of auxiliary files): Move to end of file. 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (Test of non-alphanumeric characters): Move next to "Glyph commands". 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (Trim whitespace from macro arguments): Show expected results. 2024-12-20 Gavin Smith * doc/texinfo-tex-test.texi (Images, Open or close a group in a macro) (Braceless at end of line): Adjust test cases/instructions slightly. 2024-12-20 Gavin Smith * README-hacking: adjust discussion of building for valgrind slightly 2024-12-19 Gavin Smith * README-hacking: remove note to check groff.texinfo. 2024-12-19 Gavin Smith * README-hacking: mention CFLAGS='-g -O0' to prevent false positives for valgrind. 2024-12-19 Gavin Smith * install-info/tests/defs.in: adjust valgrind invocation to report on memory leaks and use a log file 2024-12-19 Gavin Smith * README-hacking: tweak instructions for checking with valgrind * info/t/Init-test.inc: 2024 2024-12-17 Gavin Smith Bump version to 7.2 * configure.ac, * doc/refcard/txirefcard.tex, * js/info.js, * util/texi2dvi, * util/texi2pdf: change version to 7.2 2024-12-16 Patrice Dumas * configure.ac, tp/Texinfo/XS/configure.ac: add comments and TODO describing that --enable-xs-perl-libintl can be useful on platforms where gettext functions are present, but setting the locale through LANGUAGE is not implemented, as is the case for musl. 2024-12-16 Patrice Dumas * doc/texinfo.texi (small): mention that @small... commands do not take arguments. 2024-12-16 Patrice Dumas * tp/Texinfo/XS/main/translations.c (translate_string): if ENABLE_NLS is not set, remove completly the code calling functions in include files included only if ENABLE_NLS is set. * tp/Texinfo/XS/main/translations.c (configure_output_strings_translations): unindent cpp directives for consistency. 2024-12-15 Patrice Dumas * tp/texi2any.pl (set_subdir_directories): correct first directory. 2024-12-15 Patrice Dumas * tp/texi2any.pl (add_config_paths): remove a spurious subdir in @xdg_result_dirs. Also distinguish deprecated_dir and deprecated_result_dir to check if deprecated_dir is in used_xdg_base_dirs and put it in used_base_dirs. 2024-12-15 Patrice Dumas * tp/Texinfo/Common.pm (locate_include_file): remove comments, move code to where the variables are used. 2024-12-15 Patrice Dumas Unconditionally use / as directory separator * tp/texi2any.pl, * tp/Texinfo/ModulePath.pm.in (init), * tp/Texinfo/Common.pm (locate_file_in_dirs, locate_include_file), * tp/Texinfo/Convert/Converter.pm (set_file_path, determine_files_and_directory), * tp/Texinfo/Convert/HTML.pm (_load_htmlxref_files, _do_jslicenses_file, _do_js_files) (_node_redirections), * tp/Texinfo/Convert/Plaintext.pm (output), * tp/Texinfo/Convert/Text.pm (output), * tp/ext/epub3.pm (epub_convert_image_command, epub_setup, epub_finish), * tp/ext/latex2html.pm (l2h_process, l2h_retrieve_from_html, l2h_init_cache, l2h_from_cache), * tp/ext/tex4ht.pm (tex4ht_prepare), * tp/init/chm.pm (chm_init), * tp/t/test_utils.pl: Concatenate directory components of file name with '/' separator rather than calling File::Spec->catdir. 2024-12-13 Gavin Smith pretest 7.1.92 2024-12-12 Carlos Maniero (tiny change) * tp/ext/highlight_syntax.pm: show warning if HIGHLIGHT_SYNTAX is set to unknown value. * tp/tests/other/list-of-tests: set HIGHLIGHT_SYNTAX=source-highlight 2024-12-11 Gavin Smith * configure.ac: remove reference to gnulib/po subdirectory 2024-12-11 Gavin Smith Use new method for gnulib translations * info/info.c (main), * install-info/install-info.c (main): Call bindtextdomain for gnulib domain. 2024-12-11 Gavin Smith Excise gnulib/po * Makefile.am (update-po): Do not run in tp/Texinfo/XS/gnulib/po directory. * gnulib/lib/Makefile.am: rm --po-base and --po-domain options to gnulib-tool. * configure.ac, Makefile.am: remove reference to gnulib/po subdirectory. * info/info.c (main), * install-info/install-info.c (main): Do not call bindtextdomain for gnulib domain. * gnulib/po: delete entire directory * README-hacking: update 2024-12-11 Gavin Smith * (top-level), tp/Texinfo/XS: run gnulib-tool --add-import 2024-12-11 Gavin Smith * tp/tests/formatting/list-of-tests (cpp_lines): Set DOC_ENCODING_FOR_INPUT_FILE_NAME instead of INPUT_FILE_NAME_ENCODING. From Patrice. 2024-12-10 Patrice Dumas * Pod-Simple-Texinfo/pod2texi.pl (_parsed_manual_tree): rename variable. 2024-12-10 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning): set new section parent. Report on debug message from Eli. 2024-12-10 Gavin Smith * tp/tests/formatting/list-of-tests (cpp_lines): Add "-c INPUT_FILE_NAME_ENCODING=UTF-8". This prevents a test failure when the encoding is set to something else by default, e.g. Windows-1252. Report from Eli. 2024-12-10 Patrice Dumas * Pod-Simple-Texinfo/pod2texi.pl: use / in generated Texinfo code @include. Report fom Eli and solution from Gavin. 2024-12-10 Gavin Smith * tp/tests/run_parser_all.sh (post_process_output): Delete some lines from output that may have directory components in file names in order to avoid divergent test output on MS-Windows where a backslash might be used as the directory separator. Report from Eli. 2024-12-10 Gavin Smith Correct spelling * texi2any (merge_opened_files), * tp/Texinfo/Convert/HTML.pm (_do_jslicenses_file) * tp/Texinfo/Convert/Utils.pm (output_files_disable_output_encoding), * tp/Texinfo/XS/convert/convert_html.c (do_jslicenses_file), * tp/Texinfo/XS/main/convert_utils.c (output_files_open_out): Correct spelling of "overwriting". 2024-12-09 Gavin Smith Excise tp/Texinfo/XS/gnulib/po * Makefile.am (update-po): Do not run in tp/Texinfo/XS/gnulib/po directory. * tp/Texinfo/XS/gnulib/lib/Makefile.am: rm --po-base and --po-domain options to gnulib-tool. * tp/Texinfo/XS/configure.ac, tp/Texinfo/XS/Makefile.am: remove reference to gnulib/po subdirectory. * tp/Texinfo/XS/main/utils.c (messages_and_encodings_setup): Do not call bindtextdomain for gnulib domain. * tp/Texinfo/XS/gnulib/po: delete entire directory This gnulib checkout does not actually use any translated strings at present so does not need its own translation domain. In the future, an alternative method is recommended for gnulib translations that we should use instead if needed. (See https://lists.gnu.org/archive/html/bug-gnulib/2024-12/msg00042.html and https://lists.gnu.org/archive/html/bug-gnulib/2024-12/msg00043.html.) 2024-12-08 Gavin Smith * tp/Texinfo/XS/parsetexi/api.c: remove unneeded include. 2024-12-08 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c: update comment on Perl/C library plus Gnulib mixing to make clearer that there would be incompatibilities between Perl and C library memory management functions even without Gnulib. 2024-12-08 Patrice Dumas * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources), tp/Texinfo/XS/main/create_buttons.c: move create_buttons.c from convert to main, and from C_libtexinfo_convert_sources to C_libtexinfo_sources. * tp/Texinfo/XS/main/create_buttons.c (new_button_specification_info): add. * tp/Texinfo/XS/main/get_perl_info.c: remove get_sv_index_entries_sorted_by_letter, it is not used and uses Perl malloc. * tp/Texinfo/XS/main/get_perl_info.c (html_get_button_specification_list): call new_button_specification_list and new_button_specification_info. * tp/Texinfo/XS/convert/get_converter_perl_info.c, tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/main/get_perl_info.c (get_source_info): use non_perl_malloc instead of malloc when allocating data kept in the converter and unallocated outside of code including Perl headers. 2024-12-08 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (create_destination_directory), tp/Texinfo/XS/convert/texinfo.c (txi_general_setup), tp/Texinfo/XS/main/utils.h (S_ISDIR): use stat instead of opendir to check if a directory exists, as some implementations of opendir may not fail even if the directory does not exist. Report from Eli. 2024-12-08 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs, tp/Texinfo/XS/convert/build_html_perl_info.c, tp/Texinfo/XS/main/get_perl_info.c: use non_perl_free instead of free to free variables allocated outside of Perl C code. 2024-12-08 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_perl_array) (build_perl_const_element_array, build_perl_directions) (build_additional_info, build_indices_sort_strings) (build_sorted_indices_by_index, build_sorted_indices_by_letter) (output_unit_to_perl_hash, html_build_button): use non_perl_free to free a string allocated by xasprintf (from utils.c) or from print_element_debug (from errors.c), to avoid mixxing Perl/non Perl memory management functions. Based on a report from Eli. 2024-12-08 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_CPPFLAGS): remove XSLIBS_CPPFLAGS they should not be needed and break build on MinGW as Perl CORE/dirent.h is found, which does not define opendir. Remove libtexinfo_convert_la_CFLAGS. Report from Eli. 2024-12-08 Gavin Smith * tp/Texinfo/XS/TestXS.xs: remove include to avoid possible clash with redefinition of uid_t and gid_t in Perl header files. Report from Eli. 2023-12-08 Eli Zaretskii * tp/Texinfo/XS/main/build_perl_info.c (perl_only_free, perl_only_malloc), * tp/Texinfo/XS/main/get_perl_info.c (get_sv_output_units) (init_copy_sv_options): Add missing dTHX. 2024-12-06 Gavin Smith * README-hacking: adjust instructions for updating translations slightly. 2024-12-06 Gavin Smith * Makefile.am (update-po): Also run update-po in gnulib subdirectories. 2024-12-06 Gavin Smith * tp/Texinfo/XS/gnulib/po/Makevars (XGETTEXT_OPTIONS): patch to add --force-po as this gnulib import does not at present actually have any translatable strings. 2024-12-04 Gavin Smith * configure.ac: bump version to 7.1.92 2024-12-04 Gavin Smith * doc/texinfo-tex-test.texi (Images) [dvi output]: disable. 2024-12-04 Patrice Dumas * tp/Texinfo/XS/teximakehtml.c: include langinfo.h and call nl_langinfo only if HAVE_LANGINFO_CODESET is set. * tp/Texinfo/XS/teximakehtml.c (main): move code setting directories before command-line parsing. 2024-12-04 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (converter_converter): apply directly user_conf argument instead of copying first. Add const. * tp/Texinfo/XS/convert/converter.c (copy_converter_initialization_info): copy translated_commands too. 2024-12-03 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (copy_translated_commands) (apply_converter_info): add copy_translated_commands to copy translated_commands list. Copy translated_commands in apply_converter_info instead of passing the argument translated_commands list. * tp/Texinfo/XS/main/build_perl_info.c (build_sv_options_from_options_list): use size_t instead of int. 2024-12-03 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (new_converter) (set_converter_init_information): call init_generic_converter in set_converter_init_information, not in new_converter, such that new_converter only allocate the converter. Also it is more similar to Perl code. 2024-12-03 Patrice Dumas * tp/Texinfo/XS/Makefile.am (MiscXS_la_SOURCES), tp/Texinfo/XS/xsmisc.c, tp/Texinfo/XS/xsmisc.h: rename tp/Texinfo/XS/misc.c as xsmisc.c and tp/Texinfo/XS/miscxs.h as xsmisc.h. 2024-12-03 Patrice Dumas * tp/Texinfo/XS/MiscXS.xs (xs_unicode_text), tp/Texinfo/XS/misc.c (xs_unicode_substitute_text): handle in_code in MiscXS.xs, remove in_code argument from xs_unicode_text in misc.c. Rename xs_unicode_text in misc.c to xs_unicode_substitute_text to make clear that it is not exactly the same as the Perl function, as it does the substitution but does not handle in_code. * tp/Texinfo/XS/misc.c: remove unused whitespace_chars. 2024-12-03 Patrice Dumas * tp/Texinfo/XS/misc.c: add const. 2024-12-03 Gavin Smith * NEWS: mention libtool version 2024-12-03 Gavin Smith Remove stdbool.h include * tp/Texinfo/XS/main/manipulate_tree.c, * tp/Texinfo/XS/main/unicode.c, * tp/Texinfo/XS/main/utils.c, * tp/Texinfo/XS/parsetexi/def.c, * tp/Texinfo/XS/structuring_transfo/transformations.c: Remove stdbool.h include as it appears to be unnecessary and possibly causes a compilation error on Solaris 10.4. 2024-12-02 Patrice Dumas * configure.ac: remove USE_UNICODE, it is not used anywhere. * tp/Texinfo/XS/configure.ac: do not set GL_GNULIB_MDA_* anymore, there should not be any case where Perl and Gnulib headers are used together. 2024-12-02 Patrice Dumas * configure.ac: remove check for prove, prove is not used in tests anymore. 2024-12-01 Patrice Dumas * Pod-Simple-Texinfo/Changes: point to GNU Texinfo main ChangeLog. * Pod-Simple-Texinfo/prove.sh: sync with tp/prove.sh. 2024-12-01 Patrice Dumas * configure.ac (prefer_libintl_perl), tp/Texinfo/XS/configure.ac (use_libintl_perl_in_xs): fix typo in variable names. Report from Ken Brown. 2024-12-01 Patrice Dumas * tp/Texinfo/ParserNonXS.pm: add parentheses for define call. Change in spacing. 2024-12-01 Patrice Dumas * tp/Texinfo/XS/misc.c (xs_parse_texi_regex): return early if there is a NUL in the string, and do not set any output variable. * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line): handle better NUL characters in $line, which can happen with _parse_texi_regex XS override. 2024-12-01 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_end_line_starting_block) (_process_remaining_on_line): check if a command name is defined instead of testing if it is true, to catch the case of a command name or alias being '0'. * tp/Makefile.tres, tp/t/02coverage.t (command_zero), tp/t/58alias.t (alias_zero), tp/t/60macro.t (macro_name_zero): test unknown command, alias and macro name be '0'. 2024-12-01 Patrice Dumas * tp/Texinfo/XS/configure.ac: add a comment explaining that the issue --enable-xs-perl-libintl worked around is fixed. 2024-12-01 Patrice Dumas * tp/Texinfo/XSLoader.pm (init): do not fallback if additional libraries are not found and texi2any libraries are installed. Indeed, in that case, there could be RUNPATH or similar pointing to the installation directory in the XS modules objects themselves, so the libraries can still be found if the libraries .la are not found. 2024-12-01 Gavin Smith Set LC_MESSAGES via setenv before setlocale. * tp/Texinfo/XS/main/translations.c (switch_messages_locale): Set LC_ALL with setenv instead of LC_MESSAGES. (translate_string): Save and restore LC_ALL in environment. 2024-12-01 Gavin Smith Set LC_MESSAGES via setenv before setlocale. * tp/Texinfo/XS/main/translations.c (switch_messages_locale): Set "LC_MESSAGES" via setenv before setlocale (LC_MESSAGES, ""), rather than giving the locale name as the second argument to setlocale, as this may not work on some platforms including macOS, Windows, AIX, and OpenBSD. Info from Bruno Haible. 2024-11-28 Patrice Dumas * tp/t/same_parser_multiple_files.t: set locale to C and LANGUAGE to en for reproducible tests. 2024-11-27 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_general_setup), tp/Texinfo/XS/teximakehtml.c (main): do not get locales directory for output strings domain from argument, determine it as in texi2any.pl. * tp/Texinfo/XS/teximakehtml.c (enum teximakehtml_mode) (demo_parser_EXPANDED_FORMATS, main): consider 4 run modes, default to mimick texi2any, test corresponding to TEST set, but no mimicking of texi2any, 'mimick test' with both TEST set and mimicking of texi2any and demo. Add command-line options to set the different modes. * tp/Texinfo/XS/teximakehtml.c (main): set PACKAGE_* for tests run modes as in texi2any.pl. 2024-11-26 Patrice Dumas * configure.ac (--enable-xs-perl-libintl), tp/Texinfo/XS/configure.ac (--enable-xs-perl-libintl, USE_LIBINTL_PERL_IN_XS), tp/Texinfo/XS/main/translations.c (configure_output_strings_translations): add an explicit configure command-line switch to prefer calling libintl-perl from XS code. Set it if $usable_getenv_in_XS is no. Use USE_LIBINTL_PERL_IN_XS instead of HAVE_USABLE_GETENV_IN_XS in configure_output_strings_translations to determine the default for use_external_translate_string. 2024-11-26 Patrice Dumas * doc/texinfo.texi (Internationalization of Document Strings): move details on libintl implementations used to the end, and update to be clearer now that there is also a C implementation. Describe that braced argument for varying parts of the strings are used before telling that %s is not used. Remove argument on Perl version, we require that version already. Put in an @ignore block the justification of using braced argument for variable strings, there is no need for a justification. Remove the point on encoding, it is not important nowadays that UTF-8 is generally used. 2024-11-26 Gavin Smith * doc/texinfo.texi (@definfoenclose, Generating HTML) (HTML Features Customization): Avoid using the word "format" as a general synonym for "process" or "output". It should either have something to do with graphical layout or be in the context of a "file format". 2024-11-26 Gavin Smith * doc/texinfo.texi (texi2any Printed Output): Change @a4paper to @afourpaper in command as the former is a mistake. (Texinfo commands do not have digits in them.) 2024-11-26 Gavin Smith * doc/texinfo.texi (Syntax Highlighting): Add warning about change of syntax for HIGHLIGHT_SYNTAX. Suggestion from Patrice. 2024-11-24 Patrice Dumas * doc/texinfo.texi (Syntax Highlighting): mandate HIGHLIGHT_SYNTAX to be source-highlight to select source-highlight, it is better to keep the possibility of using other values provided by the user for other purposes as discussed on the mailing list. 2024-11-23 Patrice Dumas * tp/Texinfo/ModulePath.pm.in ($texinfo_uninstalled, init), tp/Texinfo/XS/TestXS.xs (xstest_init), tp/Texinfo/XS/convert/ConvertXS.xs (init), tp/Texinfo/XS/parsetexi/Parsetexi.xs (init): initialize Texinfo::ModulePath $texinfo_uninstalled to undef, such that it is possible to determine that Texinfo::ModulePath init has not been called. * tp/Texinfo/XSLoader.pm (load_libtool_library): add .libs directory if Texinfo::ModulePath $texinfo_uninstalled is set or if it is undef when Texinfo::ModulePath has not been called, as is the case when TestXS is called, as it is not called from a Perl script. 2024-11-23 Patrice Dumas * tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/Convert/TextContent.pm (_convert), tp/maintain/regenerate_commands_perl_info.pl: do not put item in Texinfo::Command %formatted_line_commands, to have the same setup as in XS/C. Update code to set $data_cmdname for item to item_LINE if in a @table and similar. 2024-11-22 Gavin Smith Change use of memcpy to memmove * tp/Texinfo/XS/main/text.c (text_append_n): Change memcpy call to memmove as this function is apparently called with overlapping memory regions by 'protect_first_parenthesis'. Report from Patrice for OpenBSD. 2024-11-22 Patrice Dumas * tp/Texinfo/Convert/ConvertXS.pm (BEGIN), tp/Texinfo/IndicesXS.pm (BEGIN): remove leading lib from library names. 2024-11-22 Patrice Dumas * tp/Texinfo/XSLoader.pm (init): add directory with .libs only if calling from build directory. 2024-11-22 Patrice Dumas * tp/Texinfo/Convert/ConvertXS.pm (BEGIN), tp/Texinfo/IndicesXS.pm (BEGIN), tp/Texinfo/StructTransfXS.pm (BEGIN): add additional libraries the XS modules depend on. 2024-11-22 Patrice Dumas * tp/Texinfo/DocumentXS.pm (BEGIN), tp/Texinfo/Parser.pm (BEGIN), tp/Texinfo/XSLoader.pm (init): remove leading -l for specified additional libraries. 2024-11-21 Gavin Smith Load libtexinfo before libtexinfoxs * tp/Texinfo/DocumentXS.pm, * tp/Texinfo/Parser.pm: Swap order of -ltexinfoxs and -ltexinfo as the former requires the latter to be loaded first. 2024-11-21 Gavin Smith * tp/Texinfo/XS/configure.ac (LT_INIT): Add "dlopen" option, as according the libtool manual it should be used when building a library that can be dlopen'd. 2024-11-21 Gavin Smith * tp/Texinfo/XSLoader.pm (load_libtool_library): Add directories where loadable objects are expected to be found to front of search path rather than the end. 2024-11-20 Gavin Smith * tp/Texinfo/XSLoader.pm (init): Use additional libraries argument to call load_libtool_library. These means we locate and load these libraries directly rather than relying on the dynamic linker to locate the libraries as a dependency of other libraries. 2024-11-20 Gavin Smith * tp/Texinfo/XSLoader.pm (init, load_libtool_library): Split out sub to handle everything up to loading the library with dl_load_file, but not any further. This could potentially be used with library files that do not have an XS bootstrap function (such as libtexinfo or libtexinfoxs). (init): Comment out code handling additional libraries argument. 2024-11-20 Gavin Smith * README-hacking: add note about reproducibility of tp/tests/input/non_ascii.tar. 2024-11-18 Gavin Smith * tp/maintain/regenerate_non_ascii_tar_file.sh: Check output of "tar --usage" in attempt to check if tar --sort=name is supported. 2024-11-18 Gavin Smith * tp/maintain/regenerate_non_ascii_tar_file.sh: Do not use "if !" construct. 2024-11-18 Gavin Smith version check for GNU tar * tp/maintain/regenerate_non_ascii_tar_file.sh: add version check for "GNU tar" before using extra flags in case of building from git. 2024-11-18 Gavin Smith * tp/maintain/regenerate_non_ascii_tar_file.sh: add maintenance script to regenerate tp/tests/input/non_ascii.tar. * autogen.sh, * tp/tests/Makefile.am (input/non_ascii.tar): Run it. 2024-11-17 Patrice Dumas * tp/Texinfo/XSLoader.pm (init): add debug call for @found_additional_libraries. 2024-11-17 Patrice Dumas * tp/Texinfo/XSLoader.pm (init): add an argument for @DynaLoader::dl_resolve_using additional libraries. * tp/Texinfo/DocumentXS.pm (BEGIN), tp/Texinfo/Parser.pm (BEGIN): add -ltexinfoxs and -ltexinfo as additional libraries. 2024-11-17 Patrice Dumas * tp/Texinfo/XSLoader.pm (init): follow the DynaLoader documentation strictly on the return of dl_findfile, dl_load_file and dl_find_symbol. Cosmetic change for dl_undef_symbols return condition. 2024-11-17 Patrice Dumas * tp/Texinfo/XSLoader.pm (_find_file): compare ref() with the empty string. * tp/Texinfo/XSLoader.pm (init): check explicitely that $dlname is undefined or the empty string. * tp/Texinfo/XSLoader.pm (_debug, _fatal): cosmetic change, call shift right at the beginning of the function. * tp/Texinfo/XSLoader.pm (_fatal, init, override): cosmetic change, call functions with parentheses. 2024-11-17 Gavin Smith Remove "command-line Unicode" condition for tests * tp/tests/encoded/list-of-tests: remove setting -D 'needcommandlineunicode Need command-line unicode' * tp/tests/run_parser_all.sh (check_need_command_line_unicode): Remove, as it is superfluous with the non-ASCII file names condition for tests which is now used with all of the affected tests. * tp/tests/Makefile.am: comment moved from run_parser_all.sh. * tp/tests/many_input_files/output_dir_file_non_ascii.sh, * tp/tests/many_input_files/output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_l2h_output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_t4ht_output_dir_non_ascii.sh: Remove ad-hoc code checking HOST_IS_WINDOWS. 2024-11-17 Gavin Smith Skip tests for non-ASCII file names * tp/tests/Makefile.am (non_ascii_extracted_stamp.txt) (built_input/non_ascii): Use "stamp" file in check_DATA instead of input files directory. This allows these files not to be created under given conditions. (non_ascii_extracted_stamp.txt) [HOST_IS_WINDOWS]: do not extract non_ascii.tar and record non-ASCII input files as unavailable. * tp/tests/encoded/list-of-tests, * tp/tests/tex_html/list-of-tests: mark some tests to skip with -D 'neednonasciifilenames Need non-ASCII file names. * tp/tests/run_parser_all.sh (check_need_non_ascii_file_names): Add check for marker in tests specifications file. * tp/tests/many_input_files/input_dir_non_ascii.sh, * tp/tests/many_input_files/output_dir_file_non_ascii.sh, * tp/tests/many_input_files/output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_l2h_output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_t4ht_output_dir_non_ascii.sh: Add ad hoc code to skip tests. 2024-11-17 Patrice Dumas * configure.ac (texinfo_cv_sys_iconv_converts_euc_cn): set to "cross compile guess no" if cross-compiling. It is better to skip the tests requiring conversion to EUC-CN in case of cross-compilation as we do not know if the host can do the conversion. Based on James Le Cuirot report and patch. 2024-11-17 Patrice Dumas * tp/Texinfo/XS/main/base_utils.c (isascii_space): add. * tp/Texinfo/XS/Makefile.am (libparagraph_la_SOURCES), tp/Texinfo/XS/xspara.c (xspara__print_escaped_spaces) (xspara_add_text): use isascii_space. * tp/Texinfo/XS/Makefile.am (libparagraph_la_CPPFLAGS), tp/Texinfo/XS/xspara.c: do not include main/text.h, include text.h and add -I. 2024-11-17 Patrice Dumas * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources), tp/Texinfo/XS/main/base_utils.c, tp/Texinfo/XS/main/utils.c: move bug, fatal, isascii_* functions to a new file main/base_utils.c out of utils.c. * tp/Texinfo/XS/Makefile.am (MiscXS_la_SOURCES, MiscXS_la_CPPFLAGS), tp/Texinfo/XS/misc.c (xs_parse_command_name): use isascii_alnum in xs_parse_command_name. Otherwise in some cases (perl 5.40 on macos) bytes part of UTF-8 strings are incorrectly considered to be alnum. Set -UHAVE_CONFIG_H in MiscXS_la_CPPFLAGS such as not to include config.h in base_utils.c as there is no need for config.h inclusion for MiscXS since Gnulib is not used at all for this XS object. 2024-11-17 Patrice Dumas * tp/Texinfo/XS/main/utils.c (isascii_alnum, isascii_alpha) (isascii_digit, isascii_lower, isascii_upper): use unsigned char for argument type, as it is the recommended type for isupper/islower... it saves the need to do an explicit cast. 2024-11-17 Gavin Smith * autogen.sh, * tp/tests/Makefile.am: use tar cf instead of -cf, etc. From Patrice. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/convert/html_prepare_converter.c (ids_hashmap_predicted_values): use heading_commands_nr. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/misc.c (xs_parse_command_name), tp/Texinfo/XS/xspara.c (xspara__print_escaped_spaces): cast argument of isalnum and isspace to unsigned char. This is recommended as those functions expect unsigned argument, and it avoids warnings with -Wchar-subscripts when the functions are implemented with an array. 2024-11-16 Patrice Dumas * install-info/install-info.c (split_entry): cast argument of isspace to unsigned char. This is recommended as this function expects unsigned argument, and it avoids warnings with -Wchar-subscripts when the function is implemented with an array. 2024-11-16 Patrice Dumas * info/footnotes.c (make_footnotes_node), info/indices.c (index_entry_matches, report_index_match), info/infodoc.c (replace_in_documentation), info/man.c (xrefs_of_manpage), info/search.c (search_forward, search_backward), info/session.c (program_name_from_file_name, info_search_1, incremental_search), info/util.c (ansi_escape, printed_representation), info/window.c (window_make_modeline): cast argument of isdigit, isupper, isalnum, islower and iscntrl to unsigned char. This is recommended as those functions expect unsigned argument, and it avoids warnings with -Wchar-subscripts when the functions are implemented with an array. 2024-11-16 Patrice Dumas * info/indices.c, info/infodoc.c, info/infomap.c, info/man.c, info/search.c, info/session.c, info/util.c: replace tabs by spaces. Changes in spacing. 2024-11-16 Gavin Smith * autogen.sh: regenerate tp/tests/input/non_ascii.tar. Suggestion from Patrice. * tp/tests/Makefile.am: update a comment 2024-11-16 Gavin Smith * tp/tests/README: mention that input/non_ascii.tar needs to be deleted manually. * tp/tests/Makefile.am (input/non_ascii.tar): add comment. Report from Patrice. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs, tp/Texinfo/XS/convert/get_converter_perl_info.c, tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/main/get_perl_info.c, tp/Texinfo/XS/parsetexi/Parsetexi.xs: remove ppport.h include following ppport.h advice. Do not follow ppport.h suggestion for call_html_perl_function.c as we use G_LIST, which is not portable. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_get_customization_sv): move FETCH definition down where it is used. 2024-11-16 Gavin Smith * tp/tests/many_input_files/tex_l2h_output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_t4ht_output_dir_non_ascii.sh: fix path of tex_encodé_utf8.texi. 2024-11-16 Gavin Smith Eliminate non-ASCII file names from tarball * tp/tests/Makefile.am (input/non_ascii.tar): Rule to create tar file of all files under input/non_ascii with non-ASCII file names. (check_DATA): Extract this tar file under built_input in build directory. (EXTRA_DIST): Distribute non_ascii.tar but not files used to build it. * tp/tests/run_parser_all.sh, * tp/tests/encoded/list-of-tests, * tp/tests/tex_html/list-of-tests, * tp/tests/many_input_files/input_dir_non_ascii.sh: access these files in new location under builddir. Files with non-ASCII names can be difficult to handle on unusual platforms, such as being difficult to delete on MS-Windows (report from Eli). They remain tracked in git. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_global_document_commands), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_get_customization_sv, html_get_jslicenses_sv), tp/Texinfo/XS/main/get_perl_info.c (get_sv_output_units_descriptor) (add_svav_to_string_list, get_sv_index_entries_sorted_by_letter) (html_get_button_specification_list), tp/Texinfo/XS/parsetexi/Parsetexi.xs (parser_store_INCLUDE_DIRECTORIES, parser_store_EXPANDED_FORMATS): replace av_top_index by AvFILL, which is more portable for older Perl versions. 2024-11-16 Patrice Dumas * README-hacking: update list of files with Perl C code. 2024-11-16 Patrice Dumas * tp/tests/many_input_files/Makefile.am (EXTRA_DIST, TESTS) (tests_dirs), tp/tests/many_input_files/first_file_not_found.sh: add a test with two files with the first one not existing. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/parsetexi/indices.c (init_index_commands), tp/Texinfo/XS/parsetexi/parser.c (parse_texi): reinitialize static variables related to indices numbers in init_index_commands, which is called right after new_document in initialize_parsing in parsetexi/api.c and therefore rigth after setting parsed_document->indices_info to 0, instead of doing it at the end of the parsing. Remove forget_indices. 2024-11-16 Patrice Dumas * tp/tests/many_input_files/tex_l2h_output_dir_non_ascii.sh, tp/tests/many_input_files/tex_t4ht_output_dir_non_ascii.sh: fix path of tex_encodé_utf8.texi. 2024-11-16 Patrice Dumas * tp/tests/tex_html/list-of-tests (tex_encoded_utf8_httex): fix path of tex_encodé_utf8.texi. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/Makefile.am (DocumentXS_la_LDFLAGS): remove $(LTLIBICONV) $(LTLIBUNISTRING) from XS link flags when the XS object does not use libunistring or iconv. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/Makefile.am: rename libxsparagraph as libparagraph, libxsutils as libperlcall_utils, libxs_in_libtexinfo as libcallperl_libtexinfo and libxs_in_libtexinfo_convert as libcallperl_libtexinfo_convert. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/configure.ac: remove unset perl_conf_PERL_LINK, it has been replaced by PERL_LIBS. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/Makefile.am (XSParagraph_la_LDFLAGS) (libtexinfoxs_la_LDFLAGS, DocumentXS_la_LIBADD) (StructuringTransfoXS_la_LIBADD, StructuringTransfoXS_la_LDFLAGS) (libtexinfo_convertxs_la_LDFLAGS, IndicesXS_la_LIBADD) (IndicesXS_la_LDFLAGS, ConvertXS_la_LIBADD, ConvertXS_la_LDFLAGS): remove $(LTLIBICONV) $(LTLIBUNISTRING) and similar from XS link flags when the XS object does not use libunistring or iconv. Remove libgnu.la from LIBADD when an XS interface or XS library do not use Gnulib. 2024-11-16 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_set_shared_conversion_state, html_get_shared_conversion_state), tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_translated_names): do not use perl_only_* wrappers as the files do not include Gnulib headers anymore. 2024-11-16 Gavin Smith Use $PERL to run Perl * tp/tests/many_input_files/different_encodings.sh, * tp/tests/many_input_files/different_languages_gen_master_menu.sh, * tp/tests/many_input_files/for_nbspaces_different_encodings.sh, * tp/tests/many_input_files/input_dir_non_ascii.sh, * tp/tests/many_input_files/output_dir_file_non_ascii.sh, * tp/tests/many_input_files/output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_l2h_output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_t4ht.sh, * tp/tests/many_input_files/tex_t4ht_output_dir_non_ascii.sh, * tp/tests/run_parser_all.sh: Use $PERL to run escape_file_names.pl. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfoxs_la_CPPFLAGS): remove -I$(srcdir)/convert. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/Makefile.am: move XS interfaces that do not need libtexinfo-convert before libtexinfo-convert. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES) (xs_LTLIBRARIES, libtexinfo_convertxs_la_SOURCES) (libtexinfo_convertxs_la_CPPFLAGS) (libtexinfo_convertxs_la_CFLAGS, libtexinfo_convertxs_la_LIBADD) (libtexinfo_convertxs_la_LDFLAGS, IndicesXS_la_LIBADD) (ConvertXS_la_LIBADD): add the libtexinfo-convertxs.la shared library with code common for XS interfaces used to call libtexinfo-convert. Remove XS_libtexinfo_convert_sources. * tp/Texinfo/XS/convert/build_html_perl_info.c, tp/Texinfo/XS/convert/get_converter_perl_info.c: remove config.h include, the Perl C files do not need Gnulib function nor autoconf defines. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/Makefile.am (XS_libtexinfo_convert_sources) (noinst_LTLIBRARIES, libxs_in_libtexinfo_convert_la_SOURCES) (libxs_in_libtexinfo_convert_la_CPPFLAGS) (libxs_in_libtexinfo_convert_la_CFLAGS) (libxs_in_libtexinfo_convert_la_LIBADD) (libxs_in_libtexinfo_convert_la_LDFLAGS) (libtexinfo_convert_la_LIBADD): add the libxs_in_libtexinfo_convert.la convenience internal library to be able to compile the C code calling Perl from libtexinfo_convert code with different flags, to avoid Gnulib flags. * tp/Texinfo/XS/convert/build_html_perl_state.c, tp/Texinfo/XS/convert/call_html_perl_function.c: remove config.h include, there is no use of Gnulib functions nor use of autoconf defines in the Perl C codes. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/Makefile.am (XS_libtexinfo_convert_sources), tp/Texinfo/XS/convert/build_html_perl_state.h, tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_translated_names, build_html_formatting_state), tp/Texinfo/XS/convert/build_html_perl_info.c: recreate build_html_perl_state.c, moving build_html_translated_names and build_html_formatting_state to the file. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_info.c, tp/Texinfo/XS/convert/build_html_perl_info.h, tp/Texinfo/XS/Makefile.am (XS_libtexinfo_convert_sources): rename build_html_perl_state.c as build_html_perl_info.c. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c, tp/Texinfo/XS/convert/call_html_perl_function.c (html_argument_formatting_type_names) (build_html_command_formatted_args), tp/Texinfo/XS/convert/convert_html.c: move html_argument_formatting_type_names and build_html_command_formatted_args to call_html_perl_function.c. * tp/Texinfo/XS/convert/build_html_perl_state.c: make build_html_translated_names static. 2024-11-15 Gavin Smith * tp/t/formats_encodings.t (accented_character_in_file_name): remove test 2024-11-15 Gavin Smith * tp/tests/input/non_ascii: New directory to centralise location of files with non-ASCII names * tp/tests/run_parser_all.sh: specify -I $srcdir/input/non_ascii on texi2any command line 2024-11-15 Gavin Smith * tp/tests/many_input_files/Makefile.am: Remove use of LONG_TESTS variable (same change made in tp/tests/Makefile.am on 2016-10-23 but this file was missed). 2024-11-15 Patrice Dumas * tp/Texinfo/XS/convert/html_prepare_converter.c (check_targets_order): use the PRIuPTR macro from inttypes.h for uintptr_t type printf format. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/Makefile.am (StructuringTransfoXS_la_CPPFLAGS) (IndicesXS_la_CPPFLAGS, ConvertXS_la_CPPFLAGS): remove $(GNULIB_CPPFLAGS) as there is no Gnulib code used in XS interfaces code. * tp/Texinfo/XS/convert/ConvertXS.xs, tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/main/DocumentXS.xs, tp/Texinfo/XS/main/IndicesXS.xs, tp/Texinfo/XS/parsetexi/Parsetexi.xs, tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs: do not include config.h as no Gnulib code is used and there is no need for autoconf defines. * tp/Texinfo/XS/main/manipulate_indices.h: add missing options_data.h include. Minor improvements in included headers. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/main/api_to_perl.c (get_refcount): call dTHX. 2024-11-15 Gavin Smith Escape non-ASCII file names in many_input_files tests * tp/tests/many_input_files/different_encodings.sh, * tp/tests/many_input_files/different_languages_gen_master_menu.sh, * tp/tests/many_input_files/for_nbspaces_different_encodings.sh, * tp/tests/many_input_files/input_dir_non_ascii.sh, * tp/tests/many_input_files/output_dir_file_non_ascii.sh, * tp/tests/many_input_files/output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_l2h_output_dir_non_ascii.sh, * tp/tests/many_input_files/tex_t4ht.sh, * tp/tests/many_input_files/tex_t4ht_output_dir_non_ascii.sh: Run escape_file_names.pl on output directory. * tp/tests/many_input_files/Makefile.am: update rules to copy output directories in their escaped form. 2024-11-15 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libxsutils_la_CPPFLAGS) (libxsutils_la_LIBADD, libtexinfo_la_LIBADD), tp/Texinfo/XS/main/xs_utils.c: include config.h in xs_utils.c as vasprintf may come from Gnulib. Add Gnulib flags and library for libxsutils.la and remove from libtexinfo.la to avoid doubly defined symbols. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/get_perl_info.c: do not include config.h, the code should not need portability defines from autoconf or Gnulib. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/XSParagraph.xs (xspara_add_text, xspara_add_next): use SvPVutf8. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/XSParagraph.xs (xspara_new): iterate over the conf hash keys instead of trying all the variables. It should be faster if there are only few variables set (not if lots of variables are set, as there is a linear search to determine the function to call). 2024-11-14 Patrice Dumas * tp/Texinfo/XS/XSParagraph.xs (xspara_new), tp/Texinfo/XS/xspara.c (xspara_SET_CONF), tp/Texinfo/XS/xspara.h (XSPARA_CONF_VARIABLES_LIST): setup a list of XSParagraph configuration variables, XSPARA_CONF_VARIABLES_LIST applied to xspara_SET_CONF such that xspara_SET_CONF can be redefined in different codes to generate code for all the configuration variables. Use XSPARA_CONF_VARIABLES_LIST in xspara.c and XSParagraph.xs. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/XSParagraph.xs (xspara_new), tp/Texinfo/XS/xspara.c (SET_CONF), tp/Texinfo/XS/xspara.h (SET_CONF): instead of passing all the configuration variables in one function, setup a function per variable using the SET_CONF macro in xspara.c and xspara.h. Remove xspara_init_state. 2024-11-14 Gavin Smith Escape non-ASCII bytes in reference test results * tp/tests/escape_file_names.pl: New file. * tp/tests/run_parser_all.sh (escape_file_names): Add, and run escape_file_names.pl on all files in output directory. This reduces the number of files with non-ASCII file namess in the sources which can cause problems on some unusual platforms. Report from Eli. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_do_js_files): set to_file_name independently of COMMAND_LINE_ENCODING. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/Makefile.am (noinst_LTLIBRARIES) (XSParagraph_la_SOURCES, libxsparagraph_la_*, XSParagraph_la_CPPFLAGS) (XSParagraph_la_LIBADD), tp/Texinfo/XS/XSParagraph.xs: add libxsparagraph.la, a convenience library for XSParagraph with the C code that does not requires Perl and requires Gnulib, to be able to pass different flags than for XSParagraph.la. Do not include config.h anymore in XSParagraph.xs as there is no need for Gnulib nor autoconf defines in this file. * README-hacking: update list of files with Perl C code. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/xspara.c (PARAGRAPH): rename french_spacing as frenchspacing to match exactly the Perl key. * tp/Texinfo/XS/XSParagraph.xs (xspara_new), tp/Texinfo/XS/xspara.c (xspara_init_state): modify xspara_init_state to be C only and get all the configuration variables in argument. Get Perl conf in xspara_new with code similar to former xspara_init_state code in XSParagraph.xs and call xspara_init_state. * tp/Texinfo/XS/xspara.c: do not include Perl headers now that there is only pure C. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/XSParagraph.xs (xspara_new), tp/Texinfo/XS/xspara.c (xspara_new): call xspara_init_state from XSParagraph.xs, not from C. * tp/Texinfo/XS/XSParagraph.xs (xspara_*), tp/Texinfo/XS/xspara.c (xspara_set_state): use XS implicit rules for conversion of paragraph integer SV to int. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/Makefile.am (MiscXS_la_CPPFLAGS, MiscXS_la_LIBADD), tp/Texinfo/XS/MiscXS.xs, tp/Texinfo/XS/misc.c: there is no use of gnulib anymore in MiscXS, remove the gnulib/autoconf flags and includes, in particular do not include config.h. * tp/Texinfo/XS/MiscXS.xs (xs_parse_command_name) (xs_parse_texi_regex), tp/Texinfo/XS/misc.c (xs_process_text) (xs_unicode_text, xs_entity_text, xs_parse_command_name) (xs_parse_texi_regex): use SvPVutf8_nolen in MiscXS.xs, not in C code. Remove useless Perl macros, remove Perl includes as there is no C Perl anymore in misc.c. 2024-11-14 Gavin Smith * tp/Texinfo/XS: run "gnulib-tool --remove-import copy-file". run "gnulib-tool --import gettext-h" as module appears to be necessary and is removed otherwise. 2024-11-14 Gavin Smith Do not require copy-file module * tp/Texinfo/XS/convert/convert_html.c (copy_file_to): New function to copy a file without using Gnulib copy-file module. Advice on file name encoding from Patrice. (html_do_js_files): Call it. The copy-file module has a large amount of dependencies and is not necessary for our needs. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/main/xs_utils.c (non_perl_*), tp/Texinfo/XS/main/utils.c: move non_perl_* functions out of utils.c to xs_utils.c. * tp/Texinfo/XS/Makefile.am (noinst_LTLIBRARIES) (libxsutils_la_SOURCES, libxs_in_libtexinfo_la_SOURCES) (libxs_in_libtexinfo_la_CPPFLAGS, libtexinfo_la_CPPFLAGS) (libtexinfoxs_la_LIBADD), tp/Texinfo/XS/main/call_perl_function.c, tp/Texinfo/XS/main/api_to_perl.c: add libxsutils and libxs_in_libtexinfo convenience libraries to be able to use different CPPFLAGS for compiltation. libxsutils contains only xs_utils and does not require any CPPFLAGS. This allows to avoid including config.h directly or indirectly in call_perl_function.c and api_to_perl.c and be fully independent of gnulib and autoconf. 2024-11-14 Patrice Dumas * README-hacking: add suggestion and instructions to run tests after turning off autovivification in Perl. 2024-11-14 Patrice Dumas * tp/Texinfo/Common.pm (locate_file_in_dirs), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser), tp/ext/epub3.pm (epub_convert_image_command), tp/init/html32.pm (html32_convert_item_command): check that hashes exist before accessing them to avoid spurious autovivification. 2024-11-14 Patrice Dumas * tp/t/test_sort.t: call Texinfo::Config::GNUT_initialize_customization, to avoid initialization being done through autovivification. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (pass_generic_converter_to_converter_sv): fix typo in generated Perl hash key name. 2024-11-14 Patrice Dumas * tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/parsetexi/api.c (initialize_parsing): remove the noop reset_obstacks function, remove comments related to obstack. 2024-11-13 Gavin Smith * tp/Texinfo/XS: run gnulib-tool --remove-import obstack. Module not currently used. 2024-11-10 Gavin Smith pretest 7.1.91 2024-11-10 Gavin Smith * configure.ac, * js/info.js, * util/texi2dvi, * util/texi2pdf: Update version to 7.1.91 2024-11-10 Gavin Smith * doc/texinfo.texi (small): Mention "@set dispenvsize small" and possibility of CSS for HTML output. 2024-11-09 Gavin Smith * doc/texinfo.texi (HTML Output Structure Customization): Clarify purpose of CONTENTS_OUTPUT_LOCATION in relation to FORMAT_MENU. SPLIT is an empty string for non-split output. Be clearer about interaction between CONTENTS_OUTPUT_LOCATION and MONOLITHIC. Information from Patrice. 2024-11-09 Gavin Smith * doc/texinfo.texi (File Names and Links Customization for HTML): edit 2024-11-09 Gavin Smith HTML Output Customization manual edit * doc/texinfo.texi (HTML Output Structure Customization): Move discussion of USE_NODES immediately after discussion of SPLIT. 2024-11-08 Gavin Smith HTML Output Customization manual edit * doc/texinfo.texi (HTML Output Structure Customization): Mention SPLIT. 2024-11-08 Gavin Smith HTML Output Customization manual edit * doc/texinfo.texi (HTML Output Structure Customization): Attempt to distentangle explanations of different customization variables. Try to present information in a logical manner with later information building on earlier information. 2024-11-08 Gavin Smith * doc/texinfo.texi (Customization of Navigation and Headers): edit 2024-11-08 Gavin Smith * doc/texinfo.texi (HTML Features Customization): edit 2024-11-08 Gavin Smith Avoid sentence end * doc/texinfo.texi (Inserting Math) (Customization Variables for Multiple Formats): Add @: after e.g. 2024-11-08 Gavin Smith * doc/texinfo.texi (Customization of Inserted HTML Code): edit 2024-11-08 Gavin Smith HTML Output Customization manual edit * doc/texinfo.texi (HTML Output Structure Customization) (HTML Customization of Specific Output): Move documentation of PROGRAM_NAME_IN_ABOUT. 2024-11-08 Gavin Smith * doc/texinfo.texi (HTML Customization for Math): Edit. 2024-11-08 Gavin Smith * doc/texinfo.texi (JavaScript Interface and Licenses): Edit. 2024-11-08 Gavin Smith * doc/texinfo.texi (JavaScript Interface and Licenses): Move subsection later in chapter. 2024-11-08 Gavin Smith HTML Output Customization manual edit * doc/texinfo.texi (Specific Customization of HTML Formatting) (HTML Customization of Specific Output): Rename. 2024-11-08 Gavin Smith HTML Output Customization manual edit * doc/texinfo.texi (HTML Output Customization): Edit slightly. (Customization of HTML Code Inserted) (Customization of Inserted HTML Code): Rename node. (Customization of Inserted HTML Code) (Specific Customization of HTML Formatting): Add introduction lines to nodes. 2024-11-08 Patrice Dumas remove unused contrib/nontests/defs.in 2024-11-08 Patrice Dumas * contrib/nontests/run_test_utils.sh (EGREP, FGREP), contrib/nontests/defs.in: remove unused EGREP and FGREP and remove copyright notice from defs.in as it is now trivial (and unused). Do not read nor find defs and defs.in from run_test_utils.sh. 2024-11-04 Gavin Smith Ease index files format change * doc/texinfo.tex (\printindex): Delay \errmessage until end of document to allow rest of index to be output. This reduces the chance of a completely empty index file being left which texi2dvi will not process. (\byeerror, \bye): Check and output \byeerror in @bye. This is an unlikely case which may not occur in real documents. It would only happen if @printindex was used on the same page as all of the index entries for the index. 2024-11-03 Patrice Dumas * contrib/nontests/test_all.sh: add copyright notice. 2024-11-03 Gavin Smith * README-hacking: add suggestion to run contrib/nontests tests * contrib/nontests/README: txitextest no longer run regularly * contrib/nontests/local.test: delete test as we do not use "local" in texi2dvi 2024-11-03 Patrice Dumas * contrib/nontests/txitextest, contrib/nontests/*.test, contrib/nontests/defs.in, contrib/nontests/run_test_utils.sh: update copyright years. 2024-11-03 Gavin Smith * doc/texinfo.tex: (\doindwritex): Do not use \immediate as we need the page number to be set at the time the page is shipped out. 2024-11-02 Patrice Dumas * contrib/nonbugs/README, contrib/nonbugs/*.texi: add a directory for Texinfo files with some issues, but not bugs. 2024-11-02 Patrice Dumas * contrib/nontests/txitextest: use a temporary directory in the current directory and create it in the script. Update manuals and paths. 2024-11-02 Patrice Dumas * util/texi2dvi (move_to_dest): use if instead of && to avoid triggering a failure with set -e if the condition is false. 2024-11-02 Patrice Dumas * contrib/nontests/defs.in, contrib/nontests/run_test_utils.sh (TEXI2DVI_run), contrib/nontests/*.test: split nontests/defs.in code independent of configure substitutions to the new file nontests/run_test_utils.sh. Assume that all tex now understands --version. Update TEXI2DVI path. Source defs in run_test_utils.sh only if it is present. Update code to be more Bourne compatible using recent autoconf generated code. Set TEXINDEX and TEXINDEX_SCRIPT in the TEXI2DVI call in TEXI2DVI_run. Determine srcdir in each test files and source run_test_utils.sh only. * contrib/nontests/run_test_utils.sh (create_input_texi) (create_input_empty_texi), contrib/nontests/texi2dvi_no_content.test, contrib/nontests/texi2dvi.test (one_run): rename create_input_texi as create_input_empty_texi and readd create_input_texi such that it outputs a minimal manual instead of a manual without content. Add texi2dvi_no_content.test that calls create_input_empty_texi. Add an index entry in one_run. * contrib/nontests/test_all.sh: run all the *.test tests. 2024-11-02 Gavin Smith * doc/texinfo.tex (\nolig): Add brace pair after 0pt to avoid swallowing a following space. Report from Werner. 2024-11-02 Gavin Smith Link toc page numbers to exact location on page * doc/texinfo.tex: (\finishentry) [pdf or xetex]: If \tocnodetarget is set, use it for the target of the page number, rather than calling \pdfgettoks. 2024-11-01 Gavin Smith LuaTeX ligature suppression * doc/texinfo.tex (\nolig): New macro to suppress ligature creation in both LuaTeX and TeX. LuaTeX diverges from the behaviour of TeX in that grouping characters do not suppress ligatures. (\unicodechardefs): Use \nolig for U+2018 and U+2019 (curly single quotes). Report from Werner Lemberg. 2024-11-01 Gavin Smith @uref line breaking * doc/texinfo.tex (\urefallowbreak): Increase stretch for ragged right output from 2 em to 3 em. * doc/texinfo-tex-test.texi (URL line breaking): add test cases. Examples sent by R. Diez. 2024-11-01 Patrice Dumas * README-hacking: update C flags. Add text about manuals interesting for the testing of HTML customization API and change of API. 2024-10-31 Gavin Smith Ease index files format conversion * doc/texinfo.tex (\doindwritex): Precede \write with \immediate. This is to help with transitioning from index files using @ as an escape character instead of \. If texinfo.tex exits with an error about the old format being used before any entries were written to the index file, then the index file will stay empty. texi2dvi does not recognise an empty file as an index file, so will not call texindex, and so the sorted index file will remain in the old format, and texi2dvi will not complete successfully until the sorted index file is manually deleted. (This was the case for the "bar" index in texinfo-tex-test.texi.) 2024-10-31 Gavin Smith * doc/texinfo.tex (\unicodechardefs): Define U+2032 (prime) with \prime in superscript. From Werner Lemberg. 2024-10-30 Patrice Dumas * tp/tests/encoded/list-of-tests (verbatiminclude_names_latin1_html) (verbatiminclude_names_latin1_html_explicit_encoding): add -c MESSAGE_ENCODING=UTF-8 to have a reproducible output. With ASCII output encoding, there is no guarantee on the representation of non-ASCII characters. Gavin idea. 2024-10-30 Patrice Dumas Add contrib/init_examples directory for texi2any initialization files 2024-10-29 Patrice Dumas * tp/Texinfo/XS/convert/call_html_perl_function.c (call_stage_handler), tp/Texinfo/XS/convert/convert_html.c (html_run_stage_handlers): set status to 1 in call_stage_handler if error status is set. Set the call_status in html_run_stage_handlers, to a positive value. 2024-10-29 Patrice Dumas * tp/Makefile.am (test_files), tp/t/init/stage_handler_bad_return.pm, tp/t/init/stage_handler_undef_return.pm, tp/tests/Makefile.onetst (type_base_one_test_files_generated_list), tp/tests/customization/list-of-tests (simplest_stage_handler_bad_return) (simplest_stage_handler_undef_return): add tests of invalid stage handlers return values. 2024-10-29 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (run_stage_handlers), tp/Texinfo/XS/convert/call_html_perl_function.c (call_stage_handler), tp/Texinfo/XS/convert/convert_html.c (html_run_stage_handlers), tp/Texinfo/XS/convert/replace_perl_call_html_function.c (call_stage_handler): check the stage handler return value and error out if it is not numeric. Add an error status argument to call_stage_handler to get the specific error in html_run_stage_handlers. 2024-10-29 Patrice Dumas * tp/Texinfo/XS/convert/hashmap.c (clear_registered_ids_c_hashmap): do not access the hashmap if it had never been initialized. 2024-10-29 Patrice Dumas * tp/t/test_utils.pl: do not set TEST for converter tests if already already set, such that TEST may be set to 0. * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/init_files_tests.t (unknown_custom_variable), tp/t/init/unknown_custom_variable.pm: test of unknown customization variables set or accessed in init file. * tp/t/test_utils.pl: add shebang (for colorization in vim). 2024-10-29 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (get_conf, set_conf, force_conf), tp/Texinfo/XS/convert/ConvertXS.xs (get_conf, set_conf, force_conf): do not abort if an unknown variable is accessed or set. In Perl, call cluck if TEST is set. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c (free_options_list): free the options itself. 2024-10-28 Gavin Smith Link to section header not just the page * doc/texinfo.tex (\tocentry): Take an extra argument, the name of the node being referenced. Set \tocnodetarget. (\finishentry) [pdf or xetex]: If \tocnodetarget is set, use it for the target of the link. (\numchapentry, \shortchapentry, \appentry, \unnchapentry) (\shortunnchapentry, \unnsecentry, \numsubsecentry, \unnsubsecentry) (\numsubsubsecentry, \unsubsubsecentry): Propagate node from .toc file to lower-level macros. (\dochapentry, \dosecentry, \dosubsecentry, \dosubsubsecentry): Propagate note to \tocentry. Hyperlinks from entries in the table of contents would go to the top of the page, not the actual section heading, which was especially confusing when there were multiple headings on a page. Report from Bruno Haible. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c (options_list_add_option_number, copy_options_list): add an argument to avoid checking for duplicates in options_list_add_option_number is argument is set to 0. Update callers. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c (copy_options_list_options, copy_options_list) (copy_options_list_set_configured): rename copy_options_list_options as copy_options_list_set_configured. Readd copy_options_list_options as a static function to only do the copy. Reorganize code to avoid redundancies. Remove add_option_copy. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (set_converter_init_information): copy directly the options list OPTIONS structure as converter format_defaults_conf. * tp/Texinfo/XS/main/customization_options.c: move code around, add static. Remove new_option and set_sorted_option_key_configured. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c (copy_options_list_options): rename copy_numbered_options_list_options as copy_options_list_options. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv): inline new_numbered_option_from_sv in get_converter_info_from_sv. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv): remove unused sorted_options argument. Update callers. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (err_add_option_value): remove unused sorted_options argument. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (converter_converter), tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup): call converter_initialize in converter_converter again. Adapt txi_converter_setup. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (destroy_converter_initialization_info), tp/Texinfo/XS/convert/texinfo.c (txi_converter_format_defaults), tp/Texinfo/XS/main/converter_types.h (CONVERTER_INITIALIZATION_INFO): remove the options field in CONVERTER_INITIALIZATION_INFO as it is now always set in conf. 2024-10-28 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c (initialize_options_list): remove the possibility to preset the number of elements in list, remove the number argument. Update callers. * tp/Texinfo/XS/convert/get_converter_perl_info.c (new_numbered_option_from_sv, get_converter_info_from_sv): call options_list_add_option_number in new_numbered_option_from_sv and simplify get_converter_info_from_sv. 2024-10-28 Patrice Dumas Always have an OPTIONS structure associated to an options list * tp/Texinfo/XS/convert/texinfo.c (txi_parser): rename OPTIONS_LIST argument as options_list. * tp/Texinfo/XS/convert/converter.c (new_converter_initialization_info): always initialize the options list. * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv), tp/maintain/regenerate_C_options_info.pl, tp/Texinfo/XS/convert/texinfo.c (txi_parser), tp/Texinfo/XS/main/build_perl_info.c (build_sv_options_from_options_list), tp/Texinfo/XS/main/customization_options.c (copy_numbered_options_list_options, initialize_options_list) (options_list_add_option_number, options_list_add_option_name) (add_option_value, add_option_copy, add_new_button_option) (free_options_list, add_option_strlist_value), tp/Texinfo/XS/main/option_types.h (OPTIONS_LIST), tp/Texinfo/XS/teximakehtml.c (main): add an OPTIONS and sorted options field to OPTIONS_LIST and initialize them in initialize_options_list. Set OPTIONS_LIST list to be the list of option numbers instead of the options themselves. Replace new_option_string_value and add_new_option_value by add_option_value. Replace options_list_add_option by options_list_add_option_number and options_list_add_option_name. Remove number_options_list as the options list are always numbered now. * tp/Texinfo/XS/convert/html_converter_init_options.c (html_converter_defaults), tp/Texinfo/XS/convert/texinfo.c (txi_parser): simplify code by using the OPTIONS to find if a customization variable is set is set. 2024-10-27 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (converter_converter), tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup): call converter_initialize in txi_converter_setup, not in converter_converter. Add top_srcdir/util to TEXINFO_LANGUAGE_DIRECTORIES as in texi2any.pl, after the converter_converter call and before calling converter_initialize. 2024-10-27 Patrice Dumas * tp/Texinfo/XS/teximakehtml.c (main): call txi_general_setup with paths setup for an uninstalled program, similarly with how Texinfo::ModulePath.pm can be used to set paths. 2024-10-27 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (setup_converter_paths_information, converter_setup), tp/Texinfo/XS/convert/texinfo.c (txi_general_setup): use a consistent order for arguments. 2024-10-27 Patrice Dumas * doc/Makefile.am (pod2texi.texi): remove temporary file. 2024-10-27 Patrice Dumas * Pod-Simple-Texinfo/Makefile.am (TEST_EXTENSIONS, T_LOG_DRIVER) (T_LOG_COMPILER, AM_T_LOG_FLAGS, test_files, EXTRA_DIST): use the automake tap framework to output the result of each of the tests. * Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t (index in head node): remove the TODO block, as a TODO block should fail. 2024-10-27 Patrice Dumas * Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_accessorize, new) (_texinfo_handle_element_end): add texinfo_perldoc_url_prefix accessor with default based on Pod::Simple::XHTML perldoc_url_prefix. * Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t (run_test): set texinfo_perldoc_url_prefix to have more reproducible test results as Pod::Simple::XHTML perldoc_url_prefix changed in 2019. 2024-10-27 Patrice Dumas * Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm: document texinfo_external_pod_as_url in Pod section. 2024-10-27 Patrice Dumas * doc/Makefile.am (pod2texi.texi): postprocess pod2texi.texi to substitute the MetaCPAN url that does not exist by the url on the GNU website. 2024-10-27 Patrice Dumas pod2texi: Use an @url to convert L<...> referring to external modules * Pod-Simple-Texinfo/Makefile.PL (WriteMakefile), Pod-Simple-Texinfo/README, configure.ac (POD_SIMPLE_TEXINFO_TESTS) (BUILD_PERL_API_TEXI): document/add Pod::Simple::XHTML dependence. * Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_accessorize), ($pod_links_html_parser, new, _texinfo_handle_element_start) (_texinfo_handle_element_end): add texinfo_external_pod_as_url configuration, set to 1 in the default case. Pass $manual_text and $section_text to L tag formatting. If texinfo_external_pod_as_url is set, format L to external Pod as an @url, using idify and perldoc_url_prefix from Pod::Simple::XHTML, mimicking Pod::Simple::XHTML resolve_pod_page_link, but without url protection, as it is already done in Texinfo::Convert::HTML. * Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t (run_test) (index in head node, protected characters, link to external module) (protected -, end of line in L, empty head2): modify run_test to pass $external_pod_as_url as first optional argument, to be able to set texinfo_external_pod_as_url to a different value as the default. * Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t (link to external module external pod as url) (protected - external pod as url) (end of line in L external pod as url): tests using the same Pod as other tests, but with texinfo_external_pod_as_url left to the default value. 2024-10-27 Patrice Dumas * tp/texi2any.pl (@texinfo_language_config_dirs): when calling texi2any in source, but not as part of a test, add top_srcdir util directory to @texinfo_language_config_dirs to find the default htmlxref.cnf file there. 2024-10-27 Patrice Dumas * util/htmlxref.cnf (source-highlight, src-highlite): use both src-highlite and source-highlight as source-highlight project name. 2024-10-27 Patrice Dumas * util/htmlxref.cnf (source-highlite): rename src-highlite as source-highlite. 2024-10-25 Gavin Smith pretest 7.1.90 2024-10-25 Gavin Smith * NEWS: edit 2024-10-25 Gavin Smith * Pod-Simple-Texinfo/pod2texi.pl: update copyright year to 2024 2024-10-25 Gavin Smith * doc/texinfo.texi (Customization Variables and Options): Remove SILENT as an equivalent for --silent as it does not work. * tp/Texinfo/options_data.txt: Remove SILENT. * NEWS: mention removal 2024-10-25 Gavin Smith * README-hacking: instructions for help2man upgrade 2024-10-25 Gavin Smith Track *.pot files in git * .gitignore: Do not ignore gnulib/po/texinfo-gnulib.pot, po/texinfo.pot or tp/Texinfo/XS/gnulib/po/texinfo_tp-gnulib.pot. (po_document/texinfo_document.pot was already tracked). This is intended to stop *.po files constantly regenerating. 2024-10-24 Patrice Dumas * Makefile.am (BUILT_SOURCES, tp/Texinfo/HTMLData.pm) (tp/Texinfo/XS/main/html_conversion_data.c), tp/Makefile.am (translated_source_files), tp/Texinfo/XS/Makefile.am (translated_source_files): build early generated source files that contain translated strings and are thus needed when building in po* directories. To help with that, add translated_source_files targets in Makefile.am of the generated source files directories such that it is easy to rebuild the files coming from any directory, in particular from an out of source build directory. 2024-10-24 Gavin Smith * README-hacking: suggest another distribution build check recipe 2024-10-24 Gavin Smith * po_document/POTFILES.in: add a file 2024-10-24 Gavin Smith * Makefile.am (po_document-check): Do not check in *.h files as these only contain declarations of translation functions, not their use. * po_document/POTFILES.in: Remove *.h files. 2024-10-24 Gavin Smith * po/POTFILES.in: add new files 2024-10-24 Gavin Smith * NEWS: state autoconf 2.72. Edit for style. 2024-10-24 Gavin Smith * util/srclist.txt: remove build-aux/texinfo.tex as this is a symlink now and therefore automatically up-to-date 2024-10-24 Gavin Smith * util/srclist.txt: remove all files under build-aux. We can add these files with "automake --add-missing" when required and do not need to worry about updating them from gnulib. 2024-10-24 Gavin Smith * autogen.sh: Call autoreconf instead of individual tools, with autopoint disabled. Do not specify --force as this overwrites INSTALL. 2024-10-24 Gavin Smith * NEWS: automake 1.17 * README-hacking: advice on automake upgrade 2024-10-24 Gavin Smith * README-hacking, configure.ac, tp/Texinfo/XS/configure.ac: Move all instructions for upgrading gettext to README-hacking. 2024-10-24 Gavin Smith * NEWS: mention gettext version 2024-10-24 Gavin Smith * tp/Texinfo/XS: update to gettext 0.22.5 2024-10-24 Gavin Smith Upgrade gettext to 0.22.5 by running gettextize at top level * README-hacking: suggest gettextize --no-changelog. Remove note about gettext 0.22. 2024-10-24 Gavin Smith Run gnulib --add-import at top level and under tp/Texinfo/XS. 2024-10-24 Patrice Dumas * doc/refcard/Makefile.am (CHECKS_ENV, ccheck, vcheck): set srcdir and top_builddir in the checking commands environment for out of source builds. 2024-10-23 Patrice Dumas * README-hacking: update ppport.h call. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (html_build_button): rename cv_name as sub_full_name to avoid ppport.h false positive. 2024-10-23 Patrice Dumas Avoid using C specific types in code * tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): use CF_block instead of ET_block_command and CF_line instead of ET_line_command and ET_lineraw_command. * tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents), tp/Texinfo/XS/parsetexi/close.c (close_command_cleanup), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/parsetexi/menus.c (end_line_menu_entry), tp/Texinfo/XS/parsetexi/multitable.c (gather_previous_item), tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space): use TF_text to determine if the cmd element can be accessed instead of C only types. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/convert/convert_html.c (html_convert_tree_append), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): change TF_at_command to TF_c_only to flag types specific of C. * tp/Texinfo/XS/main/element_types.txt: add information on flags. 2024-10-23 Gavin Smith * tp/texi2any.supp: add entries for fixed bug in valgrind, seen with "t/info_tests.t chinese_mixed_with_en_EUC_CN" and t/formats_encoding.t. See https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=947388eb043ea1c44b37df94046e1eee790ad776 2024-10-23 Patrice Dumas * tp/Texinfo/XS/parsetexi/close.c (remove_empty_content): check cmd to determine if this is an @-command, we are in the parser, so it is safe. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/transformations.c (complete_node_menu): inverse the condition for offset_at_end for a more readable condition (also like Perl). Use TF_text to make sure that the element is a container element now that it is clear that the main objective of that part of the condition is to be able to access CONTAINER fields. 2024-10-23 Patrice Dumas * tp/Texinfo/ManipulateTree.pm (move_index_entries_after_items), tp/Texinfo/XS/structuring_transfo/transformations.c (move_index_entries_after_items): change the logic of the condition on continuing to go through elements if not among some commands to have a positive condition on commands. Use TF_text to make sure that the element is a container element now that it is clear that the main objective of that part of the condition is to be able to access CONTAINER fields. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/parsetexi/handle_commands.c, tp/Texinfo/XS/parsetexi/parser.c, tp/Texinfo/XS/structuring_transfo/transformations.c: use TF_text to make sure that the element is a container element when the main objective of the code is to be able to access CONTAINER fields instead of TF_at_command. 2024-10-23 Gavin Smith * tp/Texinfo/XS/main/tree_types.h: add a comment 2024-10-23 Patrice Dumas * tp/Texinfo/XS/main/element_types.awk: do not set flags that are not directly used in C code, but are used to determine the size of the lements info array. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi) (convert_to_texinfo_internal): use elt_info_number and elt_info content being set to determine if the elt_info element should be output instead of flags. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (store_info_string) (element_to_perl_hash): check that string is set in store_info_string. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): minor rearrangement of code. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): inline store_info_element in element_to_perl_hash. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/main/tree.c (elt_info_names): add. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): process elt_info simply by going through the array. 2024-10-23 Patrice Dumas * tp/Texinfo/XS/main/tree_types.h (CONTAINER), tp/Texinfo/XS/main/element_types.awk, tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi), tp/Texinfo/XS/parsetexi/parser.c (move_last_space_to_element): remove eit_brace_content_spaces_before_argument from enum elt_info_type, use eit_spaces_before_argument instead. Do not overload enum elt_info_type indices, instead allow an unused slot for some elements in elt_info. 2024-10-21 Gavin Smith * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): Place code processing string_info together and code processing elt_info together. 2024-10-21 Gavin Smith * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): Place all calls of store_flag macro together. 2024-10-22 Patrice Dumas Rename tp/Texinfo/XS/main/options_types.h as options_data.h * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources, BUILT_SOURCES) (MAINTAINERCLEANFILES), tp/maintain/regenerate_C_options_info.pl: rename main/options_types.h as options_data.h. Report from Gavin. Update includes. 2024-10-22 Gavin Smith Move enum global_unit_direction * tp/Texinfo/XS/main/tree_types.h, * tp/Texinfo/XS/convert/html_converter_types.h (enum global_unit_direction): Move to html_converter_types.h. Include "html_conversion_data.h" in html_converter_types.h and not in tree_types.h. 2024-10-22 Gavin Smith Move enum html_text_type * tp/Texinfo/XS/main/tree_types.h, * tp/Texinfo/XS/main/option_types.h (enum html_text_type): Move to option_types.h. 2024-10-22 Gavin Smith Move enum relative_unit_direction_type definition * tp/Texinfo/XS/main/tree_types.h, tp/Texinfo/XS/main/document_types.h (enum relative_unit_direction_type): Move to document_types.h as one of the enum constants is used in OUTPUT_UNIT which is in this header. Include "html_conversion_data.h" in document_types.h. 2024-10-22 Gavin Smith * tp/Texinfo/XS/main/tree_types.h (enum directions): add comment 2024-10-22 Gavin Smith Move variable declaration * tp/Texinfo/XS/main/tree_types.h, * tp/Texinfo/XS/main/tree.h (ai_key_names): Move to tree.h as this will mean that tree_types.h again does not have any variable declarations in it. * tp/Texinfo/XS/main/tree_types.h: add a comment explaining purpose of enum ai_key_name. 2024-10-22 Gavin Smith Move OUTPUT_UNIT definition * tp/Texinfo/XS/main/tree_types.h, * tp/Texinfo/XS/main/document_types.h (enum output_unit_type) (OUTPUT_UNIT, OUTPUT_UNIT_LIST): Move to document_types.h as all source codes needing the fields of OUTPUT_UNIT also include this header. Replace with forward declaration. 2024-10-21 Gavin Smith Hardcode "info" string in hash creation * tp/Texinfo/XS/main/build_perl_info.c (setup_info_hv): Remove 'type_key' argument and always make this "info". Use HSH_info for last argument of hv_store. Callers updated throughout. (store_extra_flag): New function to replace the single usage of setup_info_hv (via store_info_integer) with 'type_key' set to "extra". 2024-10-21 Patrice Dumas * po_document/POTFILES.in: rename Texinfo/Data.pm as Texinfo/HTMLData.pm and main/conversion_data.c as main/html_conversion_data.c. 2024-10-21 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (converter_converter): remove unused variable. 2024-10-21 Patrice Dumas * tp/Texinfo/XS/Makefile.am (EXTRA_DIST): remove files from EXTRA_DIST if they are already in *SOURCE*. 2024-10-21 Patrice Dumas * tp/maintain/generate_code_convert_data.pl, tp/Makefile.am (dist_modules_DATA, Texinfo/HTMLData.pm, MAINTAINERCLEANFILES), tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources, EXTRA_DIST) (BUILT_SOURCES, main/html_conversion_data.c, MAINTAINERCLEANFILES): rename Texinfo/Data.pm as Texinfo/HTMLData.pm and main/conversion_data.c as main/html_conversion_data.c. Report from Gavin. 2024-10-21 Gavin Smith Remove Perl and string list implementations for "registered ids" * tp/Texinfo/XS/main/converter_types.h (CONVERTER): remove fields ids_data_type, registered_ids, registered_ids_hv. (enum ids_data_type): Remove. * tp/Texinfo/XS/convert/converter.c (new_converter) (converter_converter): Flags argument removed. Callers updated. * tp/Texinfo/XS/convert/call_html_perl_function.c, * tp/Texinfo/XS/convert/replace_perl_call_html_function.c (init_registered_ids_hv, is_hv_registered_id, hv_register_id) (clear_registered_ids_hv, free_registered_ids_hv): Remove. * tp/Texinfo/XS/convert/html_prepare_converter.c (html_prepare_conversion_units_targets, html_register_id) (html_id_is_registered), * tp/Texinfo/XS/convert/html_converter_finish.c (html_reset_converter, html_free_converter): Unconditionally use C hashmap implementation. 2024-10-21 Gavin Smith * tp/Texinfo/XS/main/converter_types.h (CONVERTER) [HAVE_CXX_HASHMAP]: Remove registered_ids_hashmap. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/parsetexi/Parsetexi.xs (errors): abort if there is no registrar but errors was called on a Parser. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (pass_document_parser_errors_to_registrar): setup a new registrar only if there is not one already. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_texi_piece): remove the no_store argument. * tp/Texinfo/Document.pm (%XS_overrides, new_document, parser_errors), tp/Texinfo/ParserNonXS.pm (parse_texi_line, parse_texi_file) (_line_warn, _line_error, _next_text, _parse_texi), tp/Texinfo/XS/main/DocumentXS.xs (document_parser_errors), tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/parsetexi/Parsetexi.xs (errors), tp/t/no_structure_test.t, tp/t/same_parser_multiple_files.t, tp/t/test_protect_hashchar_at_line_beginning.t, tp/t/test_tree_copy.t, tp/t/test_utils.pl, tp/texi2any.pl: store parsing errors in document in Perl in the parser_registrar key value Texinfo::Report. Add parser_errors to get the parsing errors from a Document. Keep the Parser registrar for parse_texi_line as there is no document in that case, so the parser need to be used. Using the parser to get parsing errors is not documented. * tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_texi_file) (parse_texi_piece, parse_texi_text): call directly get_document. * tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_texi_line): inline get_or_build_document in parse_texi_line, remove the function. * Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (print_texinfo_errors): pass error_messages and error_count directly as the function to get errors may be errors or parser_errors. Update callers. 2024-10-20 Patrice Dumas * tp/Texinfo/Report.pm (new, clear): fix key names. 2024-10-20 Gavin Smith * README-hacking: suggest running autopoint instead of gettextize and using --dry-run option 2024-10-20 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_initialize_parsing): merge parser and parser state in the function, return the document. Update callers. * tp/Texinfo/ParserNonXS.pm (_input_push_file): return file_name and directories even if the file could not be opened. * tp/Texinfo/ParserNonXS.pm (parse_texi_file), tp/Texinfo/XS/main/build_perl_info.c (get_document, fill_document_hv) (store_document_texinfo_tree), tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_texi_file), tp/Texinfo/XS/parsetexi/api.c (parse_file), tp/t/test_utils.pl (test), tp/texi2any.pl: return a document, with information on directories and file name even if the input file could not be opened, but do not set the tree. Use the presence of a tree to determine if parsing was successful. * tp/Texinfo/XS/main/build_perl_info.c (build_texinfo_tree): return 0 if there is no tree in document. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/parsetexi/Parsetexi.xs: reindent. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/parsetexi/Parsetexi.xs: rename parser variable as parser_sv. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (get_or_build_document), tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_texi_file) (errors): if a handle on a document is returned, do not set a registrar but instead keep with last_document_descriptor key a way to find the document where parser errors are registered for the next call to parser->errors. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/parsetexi/Parsetexi.pm, tp/Texinfo/XS/parsetexi/Parsetexi.xs (errors): implement errors in XS, remove from Parsetexi.pm. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (new_texinfo_report): fix registrar key name. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c: move new_texinfo_report code earlier. * tp/Texinfo/XS/main/build_perl_info.c (pass_document_parser_errors_to_registrar), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): create Texinfo::Report registrar object and add to parser in pass_document_parser_errors_to_registrar, when it is sure that the Perl data is needed, and not in parser. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/main/DocumentXS.xs, tp/Texinfo/XS/main/build_perl_info.c (document_tree): move document_tree code to a function in build_perl_info.c. * tp/Texinfo/XS/parsetexi/Parsetexi.pm, tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_texi_line): in Parsetexi.xs define directly parse_texi_line instead of parse_string by calling document_tree to get the tree. Remove parse_texi_line from Parsetexi.pm. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_line), tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_texi_file) (parse_texi_piece, parse_string, parse_texi_text): in Parsetexi.xs, define directly parse_texi_file instead of parse_file, parse_texi_piece instead of parse_piece, parse_texi_text instead of parse_text and check arguments in parse_string. Remove parse_texi_file, parse_texi_piece and parse_texi_text from Parsetexi.pm. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/parsetexi/Parsetexi.xs: remove now unused XS interfaces for build_document, get_document and pass_document_parser_errors_to_registrar. 2024-10-20 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (new_texinfo_report): add code doing the same as calling Texinfo::Report::new() in XS. * tp/Texinfo/XS/main/build_perl_info.c (get_document, build_document): add a registrar key by calling new_texinfo_report. * tp/Texinfo/XS/main/build_perl_info.c (get_or_build_document), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file) (parse_texi_piece, parse_texi_text, parse_texi_line), tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_file, parse_piece) (parse_string, parse_text): build the document directly in parse_* by calling the new function get_or_build_document or directly get_document. Remove _get_parser_info. 2024-10-19 Patrice Dumas * tp/Texinfo/Convert/Utils.pm (encoded_output_file_name) (encoded_input_file_name): use input_encoding_name instead of input_perl_encoding, Encode determines the alias itself. * tp/Texinfo/Document.pm (new_document), tp/Texinfo/ParserNonXS.pm (get_parser_info), tp/Texinfo/XS/main/DocumentXS.xs (set_document_global_info), tp/Texinfo/XS/main/build_perl_info.c (build_global_info), tp/Texinfo/XS/main/document_types.h (GLOBAL_INFO), tp/Texinfo/XS/main/utils.c (delete_global_info), tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info), tp/t/test_document.t: remove input_perl_encoding. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): never set the 'conf' parser key, it is not used since the time parser conf became internal only. 2024-10-19 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (parser), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): set only parser keys from parser_document_parsing_options, which in practice means do not accept a registrar in options. * tp/Texinfo/Common.pm: remove %parser_configuration and %parser_settable_configuration. 2024-10-19 Patrice Dumas * tp/Texinfo/ParserNonXS.pm, tp/Texinfo/XS/parsetexi/Parsetexi.pm: remove registrar method, it is a bad idea to be able to access directly the registrar. 2024-10-19 Patrice Dumas * tp/Texinfo/Common.pm (perl_encoding_name): add function. * tp/Texinfo/ParserNonXS.pm (get_parser_info), tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info): determine Perl encoding based on global_info input_encoding_name by calling perl_encoding_name. Remove get_perl_encoding. Note that the warning in get_perl_encoding was not kept, as it cannot happen since input_encoding_name is only set if the perl encoding is known in Perl parser, and if in a list of known encoding, all known by Perl in C. 2024-10-19 Patrice Dumas * tp/Makefile.tres: remove t/test_parser_registrar.t test, the registrar should be internal only. 2024-10-19 Gavin Smith * README-hacking: Document gnulib-tool network access. 2024-10-19 Gavin Smith Separate directory for non-gnulib m4 files (XS) * tp/Texinfo/XS/m4, tp/Texinfo/XS/build-aux/m4: Move directory. * tp/Texinfo/XS/configure.ac (AC_CONFIG_MACRO_DIRS): Change 'm4' to 'build-aux/m4'. * tp/Texinfo/XS/Makefile.am (ACLOCAL_AMFLAGS): Likewise. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c (options_list_add_option): replace option with the same name in list if already there. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (destroy_converter_initialization_info), tp/Texinfo/XS/main/converter_types.h (CONVERTER_INITIALIZATION_INFO): add OPTIONS options field and free it, in case a direct access to an OPTIONS structure is needed. * tp/Texinfo/XS/convert/texinfo.c (txi_converter_format_defaults): add to get default options based on a customization list and a format string, also setting the returned CONVERTER_INITIALIZATION_INFO options field. * tp/Texinfo/XS/convert/converter.c: move converter_set_document below convert API functions. * tp/Texinfo/XS/teximakehtml.c (main): add cmdline_options for options common for parser and converter. Add some code in comments using txi_converter_format_defaults. Move code around. 2024-10-19 Patrice Dumas * tp/Texinfo/Common.pm: change in comments. 2024-10-19 Gavin Smith * autogen.sh: pass "-I build-aux/m4" to aclocal 2024-10-19 Gavin Smith Attempt at separate directory for non-gnulib m4 files (top level) * configure.ac (AC_CONFIG_MACRO_DIRS): Add with value of "build-aux/m4 gnulib/m4". This means that gettextize can install files under build-aux/m4, not in the same directory as files from gnulib. * Makefile.am (ACLOCAL_AMFLAGS): Add -I build-aux/m4 * build-aux/m4: add directory * gnulib/m4: remove several files that are only added by gettextize, not by gnulib --add-import 2024-10-19 Gavin Smith * tp/Texinfo/XS: re-run "gettextize" and track files in new locations. 2024-10-19 Gavin Smith Attempt at separate directory for non-gnulib m4 files * tp/Texinfo/XS/configure.ac (AC_CONFIG_MACRO_DIRS): Add 'm4' as a directory as well as 'gnulib/m4'. * tp/Texinfo/XS/Makefile.am (ACLOCAL_AMFLAGS): Add '-I m4'. This means files from libtoolize and gettextize should be copied under tp/Texinfo/XS/m4, not tp/Texinfo/XS/gnulib/m4. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/main/utils.c (messages_and_encodings_setup): rename txi_base_setup as messages_and_encodings_setup. * tp/Texinfo/XS/convert/texinfo.c (txi_general_setup): rename txi_setup as txi_general_setup and add a call to messages_and_encodings_setup. * tp/Texinfo/XS/convert/texinfo.c (txi_converter_output_format_setup): add a function to dispatch output format global data setup. * tp/Texinfo/XS/teximakehtml.c (main): update. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_document_remove) (txi_converter_reset, txi_converter_destroy): rename txi_remove_document as txi_document_remove, txi_reset_converter as txi_converter_reset and txi_destroy_converter as txi_converter_destroy, for consistency. Update caller. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (converter_format_data) (converter_output, converter_convert), tp/Texinfo/XS/convert/converter.h (CONVERTER_FORMAT_DATA), tp/Texinfo/XS/convert/texinfo.c (txi_converter_output) (txi_converter_convert): add converter_output and converter_convert fields to CONVERTER_FORMAT_DATA and converter_output and converter_convert to dispatch conversion. Use it for HTML. Replace txi_html_convert and txi_html_output in texinfo.c by txi_converter_convert and txi_converter_output that call converter_output and converter_convert. * tp/Texinfo/XS/teximakehtml.c: call txi_converter_output. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/Makefile.am: remove specification of teximakehtml_LINK now that there is no C++ anymore, the default should be ok. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/parsetexi/Parsetexi.xs (init): move build_perl_info.c init code to Parsetexi.xs init and remove build_perl_info.c init function. 2024-10-19 Patrice Dumas * tp/maintain/generate_code_convert_data.pl: replace incorrect continue by next. Report from Gavin. 2024-10-19 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (converter_setup), tp/Texinfo/XS/main/document.c: inline txi_setup_lib_data in converter_setup. * tp/Texinfo/XS/main/utils.c (txi_base_setup), tp/Texinfo/XS/main/build_perl_info.c (init): move code related to messages gettext and encoding conversion iniitialization from build_perl_info.c init to the new init function in utils.c. * tp/Texinfo/XS/teximakehtml.c (main): call txi_base_setup. Rearrange code. 2024-10-19 Patrice Dumas * tp/texi2any.pl: comment out $pkgdatadir as it is not used anymore. 2024-10-18 Gavin Smith * README-hacking: add note that gettext also needs to be upgraded under tp/Texinfo/XS. 2024-10-18 Gavin Smith * tp/Texinfo/XS/gnulib/gettext.m4: re-add file by running "gettextize" under tp/Texinfo/XS/gnulib and discarding most of the changes. 2024-10-18 Gavin Smith Revert removal of gnulib *.m4 files * gnulib/m4, tp/Texinfo/XS/gnulib/m4: revert removal of gettext.m4, nls.m4, po.m4 and progtest.m4. (Reverted commit dated 2024-07-28 10:45:10, applied 2024-10-01.) 2024-10-18 Patrice Dumas * tp/Texinfo/XS/main/parser_conf.c (register_conf): break immediately if a slot is found. 2024-10-18 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_setup), tp/Texinfo/XS/teximakehtml.c (main): do not call html_format_setup in txi_setup to be output format independent, call in teximakehtml.c. 2024-10-18 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides): reorder code. * tp/Texinfo/XS/convert/texinfo.c, tp/Texinfo/XS/main/utils.c, tp/Texinfo/XS/main/utils.h: change in comments, rebase flag values. 2024-10-18 Gavin Smith Remove C++ source files * tp/Texinfo/XS/convert/call_html_cxx_function.cpp, * tp/Texinfo/XS/convert/call_html_cxx_function.h: remove * tp/Texinfo/XS/configure.ac: Remove AC_PROG_CXX check and check if C++ hashmap can be used. * tp/Texinfo/XS/Makefile.am (teximakehtml): Build without options for C++. * tp/Texinfo/XS/main/converter_types.h (enum ids_data_type): remove IDT_cxx_hashmap (CONVF_cxx_hashmap): remove * tp/Texinfo/XS/convert/converter.c (new_converter) [HAVE_CXX_HASHMAP], * tp/Texinfo/XS/convert/html_prepare_converter.c (html_prepare_conversion_units, html_register_id) (html_id_is_registered) [HAVE_CXX_HASHMAP], * tp/Texinfo/XS/convert/html_converter_finish.c (html_reset_converter, html_free_converter) [HAVE_CXX_HASHMAP]: Remove all code. 2024-10-18 Gavin Smith Fix teximakehtml memory leak * tp/Texinfo/XS/teximakehtml.c: free variable before clobbering. 2024-10-18 Gavin Smith C hashmap implementation * tp/Texinfo/XS/convert/hashmap.c (init_registered_ids_c_hashmap, is_c_hashmap_registered_id) (c_hashmap_register_id, clear_registered_ids_c_hashmap) (free_registered_ids_c_hashmap): New functions. * tp/Texinfo/XS/main/converter_types.h (enum ids_data_type): add IDT_hashmap (CONVF_hashmap): add symbol (CONVERTER): add field 'registered_ids_c_hashmap'. * tp/Texinfo/XS/convert/html_prepare_converter.c (html_prepare_conversion_units_targets, html_converter_customize): Move initialisation of hash to html_prepare_conversion_units_targets. (Suggestion from Patrice.) Add code to use C hashmap implementation if selected. Call ids_hashmap_predicted_values for the number of bins. * tp/Texinfo/XS/convert/html_prepare_converter.c (html_register_id, html_id_is_registered) : Call appropriate functions for C hashmap implementation. * tp/Texinfo/XS/convert/html_converter_finish.c (html_reset_converter, html_free_converter) : Call appropriate functions for C hashmap implementation. * tp/Texinfo/XS/convert/converter.c (new_converter), * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_or_create_sv_converter): Use C hashmap implementation by default. * tp/Texinfo/XS/teximakehtml.c (main): Use CONVF_hashmap. 2024-10-18 Patrice Dumas Function to estimate number of "targets" for a manual * tp/Texinfo/XS/convert/html_prepare_converter.c (ids_hashmap_predicted_values): New function. 2024-10-18 Patrice Dumas * tp/Texinfo/Translations.pm (translate_string), tp/Texinfo/XS/main/translations.c (translate_string): consider an empty string to be an unset value, and do the same checks in C and Perl. 2024-10-17 Gavin Smith * NEWS: State new installation location for texi2any files. 2024-10-15 Patrice Dumas * tp/Makefile.am, tp/tests/Makefile.am: add comments for script calls that are also in autogen.sh to remind that they should be kept in sync with autogen.sh calls. 2024-10-16 Vitezslav Crhonek * install-info/install-info.c (open_possibly_compressed_file): Fix resource leak by calling fclose in case of errors. 2024-10-16 Gavin Smith * install-info/install-info.c (readfile): re-order code to prevent possible memory leak. Report from Vitezslav Crhonek. 2024-10-16 Vitezslav Crhonek * install-info/install-info.c (munge_old_style_debian_options): Add missing initializer. 2024-10-15 Patrice Dumas * tp/Texinfo/XS/main/errors.c (message_list_line_error_ext) (message_list_command_warn, pmessage_list_command_warn) (message_list_command_error, message_list_document_error) (message_list_document_warn), tp/Texinfo/XS/main/utils.c (non_perl_xasprintf, xasprintf): add missing "va_end". Based on Vitezslav Crhonek report. 2024-10-15 Patrice Dumas * tp/init/book.pm (book_in_contents_button, @book_contents_buttons) (@book_output_unit_buttons): for regular output units (not for Top or special output units), have the Contents button link to the section location in table of contents, similarly with TOC_LINKS, but for a button. Based on Rudolf Adamkovič idea. 2024-10-15 Gavin Smith Fix install-info memory leak * install-info/install-info.c (open_possibly_compressed_file): Move a function call returning memory that has to be freed to prevent a theoretical memory leak in case of an error calling fclose or freopen. Report from Vitezslav Crhonek. 2024-10-15 Gavin Smith * README-hacking: add .git/hooks/post-commit script 2024-10-15 Vitezslav Crhonek * info/util.c: add missing "va_end" 2024-10-15 Gavin Smith * info/session.c (info_menu_or_ref_item, info_intuit_options_node) (info_goto_invocation_node): Use xasprintf instead of xmalloc/sprintf. The previous code appeared not to allocate memory for a final null. Report from Vitezslav Crhonek. 2024-10-15 Vitezslav Crhonek * info/infomap.c (fetch_user_maps): fix resource leak 2024-10-15 Vitezslav Crhonek * info/variables.c (read_variable_name): fix memory leak 2024-10-15 Gavin Smith Fix info memory leak * info/variables.c (set_variable): Free user-entered line. 2024-10-15 Gavin Smith Always null terminate key sequence array * info/infokey.c (compile): Always null-terminate 'seq' array. Avoid filling the array completely as this could lead to a segfault if exactly 20 characters were given in a key sequence, e.g. bbbbbbbbbbbbbbbbbbb down-line Report of uninitialised variable from Vitezslav Crhonek, found with a static analysis tool. 2024-10-15 Gavin Smith * install-info/install-info.c (open_possibly_compressed_file): Correct check of return value of freopen. Report from Vitezslav Crhonek . 2024-10-13 Patrice Dumas * tp/Texinfo/XS/configure.ac (HAVE_USABLE_GETENV_IN_XS): redirect stderr to /dev/null for test too. Fix the use of AC_DEFINE to define only if the test succeeded. * tp/Texinfo/XS/main/call_perl_function.c (call_translations_translate_string): fix Perl function name. 2024-10-13 Patrice Dumas * NEWS, tp/Texinfo/Convert/HTML.pm (_external_node_href), tp/Texinfo/XS/convert/format_html.c (external_node_href): remove .inf or .info in cross-reference manual names, but warn that they should not have been there. There are indeed manuals with .info in cross-references, for instance the glibc manual. Report from Gavin. 2024-10-13 Patrice Dumas * tp/Texinfo/XS/configure.ac (usable_getenv_in_XS) (HAVE_USABLE_GETENV_IN_XS): add a define set if getenv can safely be used in Perl, based on Perl version >= 5.38. * tp/Texinfo/XS/main/call_perl_function.c (call_translations_translate_string), tp/Texinfo/XS/main/replace_perl_api_call.c (call_translations_translate_string): add call to Texinfo::Translation::translate_string. * tp/Texinfo/Translations.pm (_XS_configure), tp/Texinfo/XS/convert/texinfo.c (txi_setup), tp/Texinfo/XS/main/DocumentXS.xs (configure_output_strings_translations), tp/Texinfo/XS/main/translations.c (use_external_translate_string) (configure_output_strings_translations, translate_string): add an argument to configure_output_strings_translations to specify whether to call Perl translate_string or not. Set the variable use_external_translate_string variable based on the argument, or on HAVE_USABLE_GETENV_IN_XS if the argument is 0. Use use_external_translate_string in translate_string to determine if call_translations_translate_string should be called. Report from Gavin. 2024-10-14 Gavin Smith * util/htmlxref.cnf (termcap): add link to single page version. (Node anchors are broken as this is from an old version of texi2html (1.52), but better than nothing.) 2024-10-13 Patrice Dumas * tp/Makefile.tres, tp/t/html_tests.t (inline_in_node): test showing that HTML elements in @inlineraw on @node and @title line end up in attributes in link or meta. Based on Benjamin Kalish report. 2024-10-13 Gavin Smith * info/infokey.c (compile): warn if octal sequence is out of range. Report from Andreas Schwab. 2024-10-13 Gavin Smith Avoid compiler warning * info/infokey.c (compile): declare a variable as an int to avoid a compiler warning "comparison is always true due to limited range of data type" with gcc -Wtype-limits. Report from Patrice and fix from Eli. 2024-10-13 Patrice Dumas * tp/init/documentation_examples.pm (MATHJAX_CONFIGURATION) (HTML_MATH): set MATHJAX_CONFIGURATION to the Texinfo manual example and HTML_MATH to mathjax. * tp/t/init_files_tests.t ($documentation_examples_text): add @displaymath using \dv from the LaTeX physics package. 2024-10-13 Patrice Dumas * tp/Texinfo/XS/convert/format_html.c (file_header_information): do not output mathjax header on every file if split. Remove trailing end of line from text output if MATHJAX_CONFIGURATION is set. 2024-10-13 Gavin Smith * doc/texinfo.texi (HTML Xref Link Basics): edit text at end of node discussing split/mono links. 2024-10-13 Gavin Smith * README-hacking: add note about removing generated gnulib header files after "git switch". 2024-10-13 Patrice Dumas * tp/Texinfo/XS/convert/format_html.c (file_header_information), tp/Texinfo/XS/convert/html_prepare_converter.c (html_setup_output): only put extra settings in MATHJAX_CONFIGURATION in C code. Do not set MATHJAX_CONFIGURATION in html_setup_output, move default MathJax configuration to file_header_information. Always output it. Only output value of MATHJAX_CONFIGURATION if set. 2024-10-13 Gavin Smith Macros for struct initialiser * info/variables.c (info_variables): Use macros to generate some of the initialiser. This is shorter and also allows providing the final 'where_set' value explicitly. 2024-10-13 Gavin Smith Only put extra settings in MATHJAX_CONFIGURATION * tp/Texinfo/Convert/HTML.pm (_setup_output): do not set MATHJAX_CONFIGURATION. (_file_header_information) : Move default MathJax configuration here from _setup_output. Always output it. Only output value of MATHJAX_CONFIGURATION if set. * doc/texinfo.texi (MathJax Customization Variables): update. do not show default texi2any configuration of MathJax. 2024-10-13 Patrice Dumas * info/util.c (printed_representation): add a comment to explain tab printed representation, based on Gavin explanation. 2024-10-13 Patrice Dumas * info/nodes.c (make_file_buffer, info_create_tag, info_create_node): initialize with memset call zeroing the structure. 2024-10-13 Patrice Dumas Install texi2any codes and included js in datadir/texi2any * configure.ac (CONVERTER), tp/Texinfo/XS/configure.ac (CONVERTER): add CONVERTER, set to texi2any. * Pod-Simple-Texinfo/Makefile.am (pod2texi), Pod-Simple-Texinfo/pod2texi.pl (BEGIN), tp/Makefile.am (do_subst), tp/texi2any.pl (BEGIN), util/Makefile.am (txixml2texi), util/txixml2texi.pl (BEGIN): pass libdir separately to set xsdir. Rename $lib_dir as $modules_dir. * Pod-Simple-Texinfo/Makefile.am (converterdatadir, modulesdir) (pod2texi), Pod-Simple-Texinfo/pod2texi.pl (BEGIN), js/Makefile.am (converterdatadir, jsdir), tp/Makefile.am (converterdatadir, do_subst) (modulesdir, convertmodulesdir, extensionsdir, initdir) (install-data-local, uninstall-local), tp/Texinfo/Convert/HTML.pm (_do_js_files), tp/Texinfo/ModulePath.pm.in ($converterdatadir), tp/Texinfo/XS/Makefile.am (converterlibdir, xsdir, converterdatadir) (modulesdir), tp/Texinfo/XS/convert/ConvertXS.xs (init), tp/Texinfo/XS/convert/convert_html.c (html_do_js_files), tp/Texinfo/XS/convert/converter.c (setup_converter_paths_information) (converter_setup), tp/Texinfo/XS/convert/converter.h (INSTALLED_PATHS), tp/Texinfo/XS/convert/texinfo.c (txi_setup), tp/Texinfo/XSLoader.pm (init), tp/texi2any.pl (BEGIN, $converter) ($extensions_dir, @converter_config_dirs, @converter_init_dirs), util/Makefile.am (txixml2texi), util/txixml2texi.pl (BEGIN): pass CONVERTER, install in $(datadir)/$(CONVERTER), rename/replace pkgdatadir by converterdatadir. 2024-10-12 Patrice Dumas * info/nodes.c (info_create_tag): do not set nodestart_adjusted to -1, this special value is not used anymore. 2024-10-12 Patrice Dumas * info/nodes.c (info_node_of_tag_ext): call adjust_nodestart directly, as if nodelen is > 0 nodestart_adjusted is necessarily set, while if nodelen is 0, nodestart_adjusted is not set. 2024-10-12 Patrice Dumas * info/nodes.c (find_node_from_tag, info_node_of_tag_ext): remove unused parent argument. 2024-10-12 Patrice Dumas * info/search.c: add const. 2024-10-12 Patrice Dumas * info/nodes.c (info_node_of_tag_ext): add an intermediary variable for node tag and node tag pointer for a clearer code. Rename input tag and tag pointer variables. 2024-10-12 Patrice Dumas * info/indices.c (info_indices_of_file_buffer), info/nodes.c (build_tag_table, get_nodes_of_tags_table, info_create_tag) (info_node_of_tag_ext), info/nodes.h (T_IsAnchor), info/scan.c (copy_input_to_output, scan_node_contents), info/session.c (info_last_node, info_first_node, info_search_internal): add T_IsAnchor tag flag to mark that a tag is a Ref anchor tag. Do not use TAG cache.nodelen to determine if a tag is an anchor, use the flag. Initialize TAG cache.nodelen to 0 and consider that the nodelen has not been found for a node tag if cache.nodelen is 0. 2024-10-12 Patrice Dumas * info/nodes.h, info/session.c: separate flag for tags from flags for nodes. Use a leading T_ for for tag flags. Move tag flag near TAG. 2024-10-12 Patrice Dumas * info/nodes.c (info_node_of_tag_ext): do not copy tag flags to node. The only flag set in tag is N_SeenBySearch and it is not used in nodes. 2024-10-12 Patrice Dumas * info/nodes.h: change in comments. Move values for FILE_BUFFER.flags near FILE_BUFFER. No change in code. 2024-10-12 Patrice Dumas * info/nodes.c, info/nodes.h, info/session.c: separate flags for nodes and tags from flags for file buffers. Use a leading F_ for file buffer flags. 2024-10-12 Patrice Dumas * info/nodes.c (info_node_of_tag_ext): do not set N_IsCompressed on nodes, it is only relevant and used at the file buffer level. 2024-10-12 Patrice Dumas * info/nodes.c (init_file_buffer_tag), info/man.c (get_manpage_node): do not set N_HasTagsTable on a manpage node nor on a tag entry, it is only relevant and used at the file buffer level. 2024-10-12 Patrice Dumas * info/nodes.c (init_file_buffer_tag): do not set N_TagsIndirect on the entry, it is only relevant and used at the file buffer level. 2024-10-12 Patrice Dumas * info/nodes.c (info_create_node): initialize nodelen field to 0. Previously it was set to -1, but it is confusing because the value was never used. In most cases nodelen is set right after the call to info_create_node. In case of man page, it may not be set right away, but then it is the contents field that is used to determine if the man page node was setup. 2024-10-12 Patrice Dumas * info/dir.c, info/display.c, info/scan.c: reindent, replace tabs by spaces, remove spaces, minor edit of a comment. 2024-10-12 Patrice Dumas * tp/Texinfo/XS/convert/html_prepare_converter.c (html_initialize_output_state): add end of line to debug message. 2024-10-11 Gavin Smith CHECK_HTMLXREF on by default. * tp/Texinfo/Convert/converters_defaults.txt (html): Set CHECK_HTMLXREF on by default. * tp/t/test_utils.pl (set_converter_option_defaults): Clear CHECK_HTMLXREF. * doc/texinfo.texi (File Names and Links Customization for HTML), * NEWS: Update. 2024-10-11 Patrice Dumas * info/nodes.c (info_get_node_with_defaults): remove filename_in in condition inside, as it can only be setbecause of condition outside. Do not initialize filename and nodename, they are always set. 2024-10-11 Patrice Dumas * info/footnotes.c (make_footnotes_node): use fn_node directly to determine if the node associated to the footnote was found. 2024-10-11 Patrice Dumas * info/window.c: reindent, replace tabs by spaces, remove spaces. 2024-10-11 Patrice Dumas * info/session.c (info_handle_pointer): abort if the input label is not one of the expected labels. It should never happen as the callers set the label explicitely. 2024-10-11 Patrice Dumas * tp/Texinfo/XS/parsetexi/handle_commands.c (parse_rawline_command): go to unmacro_badname when there is trailing garbage on @unmacro line, not to the @clear similar label. 2024-10-11 Patrice Dumas * tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): fix condition to be cmd is CM_item and not there is a cmd. 2024-10-11 Patrice Dumas * tp/Texinfo/XS/main/utils.c (is_content_empty): fix condition. 2024-10-11 Patrice Dumas * tp/Texinfo/XS/main/DocumentXS.xs (gdt): add missing braces for block. (Note that the corresponding code is not used). 2024-10-11 Patrice Dumas * tp/Texinfo/XS/convert/format_html.c (html_internal_command_tree): fix condition (found by clang "logical not is only applied to the left hand side of this comparison"). 2024-10-11 Patrice Dumas * tp/Texinfo/XS/parsetexi/macro.c (parse_macro_command_line): remove variable set but unused. 2024-10-11 Patrice Dumas * info/display.c (display_update_node_text), info/session.c (looking_at_newline, looking_at_alnum): check mbi_avail return value. The caller probably makes sure that there are bytes, but this should be more robust and could still be relevant for invalid multibytes sequences depending on mbi_avail implementation. 2024-10-10 Patrice Dumas * info/terminal.c (keys, keys2), info/variables.c (styles), tp/Texinfo/XS/main/utils.c (def_aliases, default_expanded_formats), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), tp/Texinfo/XS/parsetexi/indices.c (default_indices) (def_command_indices), tp/Texinfo/XS/parsetexi/def.c (def_maps): add braces for each structure in arrays initialization. 2024-10-10 Patrice Dumas * tp/Texinfo/XS/main/command_data.awk, tp/Texinfo/XS/main/element_types.awk, tp/maintain/generate_code_convert_data.pl, tp/maintain/regenerate_C_options_info.pl, tp/maintain/setup_converters_code_tables.pl: add braces for each structure in arrays. Update scripts generating codes reading command_data.c to get the commands order. 2024-10-10 Patrice Dumas * tp/Texinfo/XS/configure.ac (PERL_LIBS, perl_conf_LDFLAGS) (platform_PERL_LIBADD): set PERL_LIBS to -L.. -l for Perl. Add it to platform_PERL_LIBADD but not to perl_conf_LDFLAGS. * tp/Texinfo/XS/Makefile.am (TestXS_la_LIBADD, MiscXS_la_LIBADD) (XSParagraph_la_LIBADD, libtexinfo_la_LIBADD, libtexinfoxs_la_LIBADD) (libtexinfo_convert_la_LIBADD, Parsetexi_la_LIBADD) (DocumentXS_la_LIBADD, StructuringTransfoXS_la_LIBADD) (IndicesXS_la_LIBADD, ConvertXS_la_LIBADD): postpend $(platform_PERL_LIBADD) when linking against Perl such that the library appears after the other libraries to resolve the symbols. From Eli. 2024-10-10 Patrice Dumas * info/session.c (info_read_and_dispatch, info_next_line) (info_prev_line), info/window.c (window_make_window) (set_window_pagetop), info/window.h (WINDOW): instead of using -1 value of WINDOW goal_column to signal that the cursor should be placed in the column it is currently in, add and use the W_CurrentColGoal flag. Set WINDOW goal_column to size_t as it is compared to unsigned fields of LINE_MAP. 2024-10-10 Patrice Dumas * info/window.c (collect_line_starts): add a comment to explain that there is a comparison of unsigned and signed integers. 2024-10-10 Patrice Dumas * info/t/Init-test.inc: modify proposed valgrind call in comment to use basename for out of source builds and put logs in t/. 2024-10-10 Patrice Dumas * info/filesys.c (filesys_read_info_file): convert to ssize_t to use as read return value an not to size_t and convert to size_t later on. Do not cast finfo->st_size to (long), leave it as off_t and convert to either size_t or ssize_t depending on how the file is read. Add comments to mark conversion from unsigned to signed. * info/filesys.c (convert_eols): use size_t in argument an as return type. 2024-10-10 Patrice Dumas * info/window.h (LINE_MAP): use long for nline field to be consistent with the remaining line numbers that are unsigned. * info/window.c (set_window_pagetop, window_line_of_point) (line_map_init, window_compute_line_map): replace some int by long for consistency across functions, structure fields and variables types. 2024-10-09 Patrice Dumas Remove N_CannotGC, it is checked but never set * info/session.c (gc_file_buffers_and_nodes): do not check N_CannotGC in file buffer flag as it is not set anywhere. 2024-10-09 Patrice Dumas Remove N_UpdateTags, it is set but never checked * info/nodes.c (adjust_nodestart): do not set N_UpdateTags in node->flags as it is not checked anywhere, and nodestart_adjusted is set right away for the tag, not need to change the tag further. 2024-10-09 Patrice Dumas * info/window.c (window_log_to_phys_line): use consistent type. 2024-10-09 Patrice Dumas * info/session.c (info_menu_or_ref_item): use long consistently with node and windows length types, call labs instead of abs. 2024-10-09 Patrice Dumas * info/session.c (ask_for_search_string): explicitely convert the min_search_length variable to size_t before comparing with mbslen. * info/util.c (text_buffer_fill): use size_t to be consistent. 2024-10-09 Patrice Dumas * info/session.c (move_to_goal_column): use size_t for long. The window->goal_column is necessarily positive, as move_to_goal_column is called after window_get_cursor_column if window->goal_column was negative. And the LINE_MAP structure uses size_t for columns indices. 2024-10-09 Patrice Dumas * info/search.c (extend_matches, regexp_search), info/window.h (MATCH_STATE): make MATCH_STATE buflen long to be consistent with nodes length types and also with regoff_t. 2024-10-09 Patrice Dumas * info/nodes.c (info_reload_file_buffer_contents): add an intermediate variable for filesize passed to filesys_read_info_file. * info/nodes.h (FILE_BUFFER), info/nodes.c (info_reload_file_buffer_contents, info_load_file): use long for filesize instead of size_t to be sure that comparisons with node and search length are always safe. Add comments to explicit where the conversion from size_t to long is done. 2024-10-09 Patrice Dumas * info/nodes.c (info_create_node): use consistent type. * info/nodes.c (info_node_of_tag_ext): remove cast of node->nodelen to unsigned long, it is not useful, node->nodelen should be positive at this point, and could be dangerous, as node->display_pos is long. * info/nodes.c (info_node_of_tag_ext): always reset node->display_pos to zero if negative. It should not happen, but it is always safer. 2024-10-09 Patrice Dumas * info/echo-area.c (remove_completion_duplicates, build_completions): get completions number in argument and return the new completions number. * info/echo-area.c (build_completions): use a size_t index variable to add entries to completions_found. Pass this variable to remove_completion_duplicates and retrieve the modified value. Set completions_found_index at this point, such that the conversion to long is explicit, and mark in a comment that the completions_found* and LCD_completion should not be modified after that point and before a call to build_completions. 2024-10-09 Patrice Dumas * info/echo-area.c (completions_found_index) (info_read_completing_internal, ea_possible_completions) (build_completions, remove_completion_duplicates): use long even if the variable should never be negative as it is more robust for comparisons and consistent with windows fields types. 2024-10-09 Patrice Dumas * info/display.c (display_update_one_window): use long type consistent with windows fields types. 2024-10-08 Patrice Dumas * info/display.c (display_update_line): add int variables to avoid issues with unsigned int underflow and compare only signed integers with signed integers. 2024-10-08 Patrice Dumas * info/man.c (xrefs_of_manpage): use int for consistency. * info/display.c (display_process_line), info/util.c (ansi_escape) (printed_representation), info/man.c (clean_manpage), info/window.c (calculate_line_starts, window_compute_line_map): use int for ansi_escape len and printed_representation pbytes and pchars for consistency and also in case wcwidth in printed_representation returns a negative value. 2024-10-08 Patrice Dumas * info/nodes.c (SUBFILE), info/nodes.h (TAG): go back to long type instead of size_t even if the variable should never be negative as it is more robust for comparisons, as discussed in: https://lists.gnu.org/archive/html/bug-texinfo/2024-10/msg00067.html 2024-10-08 Patrice Dumas * info/dir.c (add_menu_to_node): call insert_text_into_node with node->nodelen argument directly instead of setting an intermediate variable. 2024-10-08 Patrice Dumas * info/nodes.c (SUBFILE): turn first_byte field to size_t as it is certain that it is positive now. * info/nodes.c (get_tags_of_indirect_tags_table): rename first_byte variable as line_first_byte. 2024-10-08 Patrice Dumas * info/nodes.c (get_tags_of_indirect_tags_table): ignore a bogus entry in indirect tags table with a negative offset for a file. 2024-10-07 Patrice Dumas * info/search.c (find_file_section): stop as soon as the position reached the binding end. 2024-10-07 Patrice Dumas * info/nodes.c (DEFAULT_INFO_TAG_TABLE_RANGE) (build_tags_and_nodes): rename DEFAULT_INFO_LOCAL_VAR_RANGE as DEFAULT_INFO_TAG_TABLE_RANGE. Avoid setting search binding end or start to negative numbers, even temporarily, using DEFAULT_INFO_TAG_TABLE_RANGE as in get_file_character_encoding. 2024-10-07 Patrice Dumas * info/nodes.c (info_create_tag), info/nodes.h (TAG): set TAG nodestart to be size_t and initialize to 0. Indeed, right after info_create_tag is called, the tag nodestart is set to a non-negative value. It should not be possible to have 0 for nodestart from build_tag_table as there is at least the node separator. A bogus entry in tag table or a 0 in tag table is possible and although it is unlikely to be correct, nodestart can be adjusted. * info/nodes.c (adjust_nodestart, info_node_of_tag_ext): remove conditions on tag->nodestart being >= 0, as it is always true. 2024-10-07 Patrice Dumas * info/nodes.c (get_nodes_of_tags_table): ignore node with bogus negative offset in tag table. 2024-10-07 Patrice Dumas * info/nodes.c (DEFAULT_INFO_LOCAL_VAR_RANGE) (get_file_character_encoding, adjust_nodestart): avoid setting search binding end or start to negative numbers, even temporarily. 2024-10-07 Patrice Dumas * info/search.c (looking_at): modify comment, as the string is necessarily found. 2024-10-07 Patrice Dumas * info/dir.c (insert_text_into_node): use size_t in argument for a length. * info/nodes.c (get_node_length): return size_t. * info/man.c (get_manpage_node, xrefs_of_manpage), info/nodes.c (build_tags_and_nodes, get_tags_of_indirect_tags_table) (get_file_character_encoding, get_node_length), info/search.c (search_forward, search_backward, string_in_line): use size_t for variables representing length, numbers or indices in arrays. 2024-10-07 Gavin Smith Fix info.js index lookup to go to correct location * js/info.js (cache_index_links): Save location of index anchor rather than just the node it is in. This means that lookups of the index entry can scroll to the correct part of the node. Rename local variables to refer to "entries" rather than "links" as this is now misnamed. (init_sidebar): Always use result of linkid_split to update sidebar. Report and investigation by Benjamin Kalish. 2024-10-07 Gavin Smith * doc/texinfo.texi (@cartouche): Remove statement that there is a simple rectangle for cartouche in HTML output. 2024-10-07 Gavin Smith * js/info.js (config): Rename INDEX_NAME to TOP_NAME and INDEX_ID to TOP_ID to avoid confusion with document indices. Give TOP_ID the default value "top" instead of "index". 2024-10-06 Gavin Smith * js/info.js: add more debug statements 2024-10-06 Patrice Dumas * info/scan.c (match_in_match_list): add an indicatric variable such that index can be used solely as an index. * info/scan.c (read_bracketed_filename, read_quoted_string), info/search.c (skip_whitespace, skip_whitespace_and_newlines) (skip_non_whitespace, skip_node_separator), info/window.c (window_point_to_column): return size_t as it is a length. * info/window.c (window_get_cursor_column): return long as it is the type of the variable assigned to. * info/scan.c (read_quoted_string, skip_input), info/search.c (match_in_match_list, match_by_index, at_end_of_matches): use size_t in argument for an index in array, a length or a number. * info/echo-area.c (ea_possible_completions) (remove_completion_duplicates), info/info.c (info_find_matching_files), info/infopath.c (infopath_add_dir), info/nodemenu.c (get_visited_nodes), info/scan.c (read_quoted_string) (parse_top_node_line, scan_reference_label, scan_reference_target), info/search.c (match_in_match_list, find_file_section), info/session.c (forget_window_and_nodes, point_forward_char, point_forward_word) (gc_file_buffers_and_nodes, info_search_in_node_internal) (wipe_seen_flags, info_tree_search, pop_isearch, show_isearch_prompt) (initialize_byte_map), info/terminal.c (initialize_byte_map): use size_t for variables representing length, numbers or indices in arrays. * info/echo-area.c (input_line_node, LCD_reference): complete with 0 for code clarity. * info/session.c (info_handle_pointer): add const. 2024-10-06 Patrice Dumas * info/infomap.c (locate_init_file): initialize filename such that it is not used uninitialized if homedir is not set. 2024-10-06 Patrice Dumas * configure.ac (additional-checks), tp/Texinfo/XS/configure.ac (additional-checks, DISABLE_ADDITIONAL_CHECKS): add configure --enable-additional-checks and associated DISABLE_ADDITIONAL_CHECKS automake conditional. * tp/Texinfo/XS/Makefile.am (noinst_PROGRAMS): build teximakehtml only if DISABLE_ADDITIONAL_CHECKS is not set. 2024-10-06 Patrice Dumas * tp/Texinfo/XS/main/replace_perl_api_call.c (call_setup_collator): remove bug message as this function may be called if not linked against Perl and a collation locale was specified but not found. * tp/Texinfo/XS/main/manipulate_indices.c (setup_collator): If there is no collator returned by call_setup_collator, fallback to ctn_no_unicode. Happens if not linked against Perl and a collation locale was specified but not found. May possibly happen in other cases. Report from Gavin. 2024-10-06 Patrice Dumas * tp/Texinfo/XS/teximakehtml.c (test_parser_EXPANDED_FORMATS_array) (main): expande @iftex sections in test mode only, by default only expand @ifhtml. Report from Gavin. 2024-10-06 Patrice Dumas * tp/Texinfo/ManipulateTree.pm (move_index_entries_after_items), tp/Texinfo/XS/structuring_transfo/transformations.c (move_index_entries_after_items): consider a @subentry to be part of the moved index entries. Report from Thérèse Godefroy. * tp/t/index_before_item.t (subentry): add test with @subentry in @cindex. 2024-10-06 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (converter_converter), tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup), tp/Texinfo/XS/teximakehtml.c (main): add C converter specific flags argument to converter_converter and txi_converter_setup. * tp/Texinfo/XS/convert/texinfo.c: remove txi_converter. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/Makefile.am (noinst_PROGRAMS): build teximakehtml only if HAVE_ICONV is set. 2024-10-05 Gavin Smith info.js start tracing option * js/info.js (debug): add function. (config): add DEBUG key. (updater): log action type with debug 2024-10-05 Gavin Smith * js/info.js (updater): add a comment 2024-10-05 Gavin Smith Rename info.js variable * js/info.js (updater): Rename local variable from 'res' to 'result' so that we are reminded that is it is the result that is returned from this function. Correct spelling of "functional". 2024-10-05 Gavin Smith Rename info.js variable * js/info.js (init_index_page, updater): Rename "index" variable and fields to "TI_index" to mark it as a Text_input object and make it clearer when this object is being used as opposed to other various contradictory uses of the word "index". 2024-10-05 Gavin Smith * js/info.js (init_index_page, navigation_links): rename "menu" variable and fields to "TI_menu" to mark it as a Text_input object. 2024-10-05 Gavin Smith * js/info.js: Exdent entire body of file (except inside a string constant) in attempt to make nested functions more apparent. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/Makefile.am: add teximakehtml_LDFLAGS. Set explicitely teximakehtml_LINK to link with C++ only if TXI_HAVE_CXX_HASHMAP is set. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/convert/call_html_cxx_function.cpp, tp/Texinfo/XS/configure.ac (texinfo_cv_cxx_hashmap): include string for std::string. * tp/Texinfo/XS/configure.ac (TXI_HAVE_CXX_HASHMAP), tp/Texinfo/XS/Makefile.am (TXI_CXX_CPPFLAGS, teximakehtml_CPPFLAGS): rename HAVE_CXX_HASHMAP automake conditional as TXI_HAVE_CXX_HASHMAP. Only set an automake conditional for CXX hashmap, and pass directly -D in Makefile.am if set. * tp/Texinfo/XS/Makefile.am (C_libtexinfo_convert_sources) (teximakehtml_SOURCES): add call_html_cxx_function.cpp to teximakehtml_SOURCES only. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/configure.ac (PACKAGE_XS_VERSION), tp/Texinfo/XSLoader.pm ($xs_version, init): replace hyphen by dot in version for XS_VERSION comparison. Rename PACKAGE_PERL_NUMERICAL_VERSION as PACKAGE_XS_VERSION and $numerical_version as $xs_version. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/Makefile.am (XSLIBS_CPPFLAGS), tp/Texinfo/XS/configure.ac (PACKAGE_PERL_NUMERICAL_VERSION) (XS_VERSION), tp/Texinfo/XSLoader.pm ($numerical_version, init): setup numerical versions for XS_VERSION in configure.ac and compare numerical version in XSLoader.pm to compare numerical through bootstrap. 2024-10-05 Patrice Dumas TODO: remove more mixing of direct processing and libraries 2024-10-05 Gavin Smith Fix translated strings for definition lines beginning @tie{}-- * po_document/adjust-translations.pl: adjust translations for strings beginning "@tie{}-- " to have an extra hyphen as these strings have changed in the program and the translations wouldn't be used otherwise. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/convert/html_prepare_converter.c (html_process_css_file): add a semicolon (empty statement) after the nocharset label. Report from Bruno. 2024-10-05 Patrice Dumas TODO: remove unclear information mixing direct processing and bindings 2024-10-05 Patrice Dumas * tp/Texinfo/XS/convert/html_converter_finish.c (html_free_converter): use a size_t index for self->pending_closes.list. 2024-10-05 Patrice Dumas Update tp/maintain/lib/README 2024-08-31 Patrice Dumas * tp/Texinfo/Convert/Converter.pm: reorder functions, add more sections in file. 2024-08-31 Patrice Dumas Changes in POD, TODO. 2024-08-31 Patrice Dumas * tp/texi2any.pl ($configured_url): replace http by https in $configured_url. 2024-08-31 Patrice Dumas * tp/Texinfo/Convert/converters_defaults.txt (PACKAGE_URL), tp/texi2any.pl (%test_conf): replace http by https in converters_defaults.txt and for tests. * tp/Texinfo/XS/convert/texinfo.c (err_add_option_string_value) (txi_converter_setup): print out an error message if the customization option was not set. Do not set *_CONF variables, these are not customization variables. * tp/Texinfo/XS/teximakehtml.c (main): set PACKAGE_VERSION and PACKAGE_AND_VERSION to the values set in texi2any.pl, not texi2any, for comparison with calls of in-source texi2any.pl. 2024-08-31 Patrice Dumas * tp/texi2any.pl ($configured_package, $configured_name), tp/Texinfo/Convert/converters_defaults.txt (PACKAGE, PACKAGE_NAME): more consistent PACKAGE and PACKAGE_NAME values when not using values set by configure. 2024-08-31 Patrice Dumas * tp/Texinfo/XS/configure.ac (AC_INIT): use the same package name as in the top-level configure.ac, such that the config.h variables are the same. 2024-08-31 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup): set PACKAGE_* and PACKAGE_*_CONFIG customization variables. * tp/Texinfo/XS/teximakehtml.c (main): add an option to select either a reproducible demonstration mode or texi2any mimicking mode. 2024-08-30 Patrice Dumas * tp/Texinfo/Convert/Converter.pm: changes in POD documentation and comment. 2024-08-30 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (%common_converters_defaults) (output_tree), tp/Texinfo/Convert/HTML.pm (_external_node_href) (_setup_output), tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm (output), tp/Texinfo/Convert/LaTeX.pm (output), tp/Texinfo/Convert/Plaintext.pm (output), tp/Texinfo/XS/convert/converter.c (apply_converter_info) (destroy_converter_initialization_info) (copy_converter_initialization_info, free_generic_converter), tp/Texinfo/XS/convert/format_html.c (external_node_href), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv), tp/Texinfo/XS/convert/html_prepare_converter.c (html_setup_output), tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup), tp/Texinfo/XS/main/build_perl_info.c (pass_generic_converter_to_converter_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER_INITIALIZATION_INFO) (CONVERTER), tp/t/test_converter_option.t, tp/t/test_utils.pl (set_converter_option_defaults), tp/texi2any.pl: use TEXINFO_OUTPUT_FORMAT customization variable value instead of self->{'output_format'}. Remove self->{'output_format'} and similar C data. * doc/texinfo.texi (Customization Variables and Options) (Customization Variables, Global Customization Variables): document TEXINFO_OUTPUT_FORMAT in global customization variables, and explain that TEXINFO_OUTPUT_FORMAT is alwyas set. 2024-08-30 Patrice Dumas * tp/texi2any.pl ($output_format): rename $format as $output_format. 2024-08-30 Patrice Dumas * tp/texi2any.pl ($main_program_set_options, $format) (set_cmdline_format, set_format): set $format from the TEXINFO_OUTPUT_FORMAT customization variable. Set TEXINFO_OUTPUT_FORMAT to 'info' in $main_program_set_options. Add the set_cmdline_format function to set TEXINFO_OUTPUT_FORMAT from command line, using directly the texinfoxml format name for xml. Modify set_format to call Texinfo::Config::texinfo_set_from_init_file to set TEXINFO_OUTPUT_FORMAT. Call set_format for TEXINFO_OUTPUT_FORMAT environment variable, for GNUT_get_format_from_init_file value, but also for TEXINFO_OUTPUT_FORMAT set from the command line. 2024-08-26 Patrice Dumas * README-hacking, tp/Texinfo/XSLoader.pm (init), tp/Texinfo/XS/configure.ac (AC_INIT), tp/maintain/change_perl_modules_version.sh: in XSLoader.pm init, pass the module version as argument to the bootstrap XS object function to compare to the XS_VERSION value. Set tp/Texinfo/XS/configure.ac AC_INIT version to the same version as the top-level configure.ac in change_perl_modules_version.sh. Since XS_VERSION is set based on the configure.ac AC_INIT version through Makefile.am for all the XS objects, the version check should pass. * tp/Texinfo/XSLoader.pm (init), tp/Texinfo/Convert/ConvertXS.pm, tp/Texinfo/Convert/Paragraph.pm, tp/Texinfo/DocumentXS.pm, tp/Texinfo/IndicesXS.pm, tp/Texinfo/MiscXS.pm, tp/Texinfo/Parser.pm, tp/Texinfo/StructTransfXS.pm, tp/Texinfo/XS/TestXS.pm: remove the XSLoader.pm init module interface number argument. 2024-08-25 Patrice Dumas * tp/Texinfo/XS/convert/html_prepare_converter.c (parse_htmlxref_files): remove only the last /. * tp/Texinfo/XS/main/customization_options.c (add_option_strlist_value): add. * tp/Texinfo/XS/convert/converter.c (apply_converter_info) (destroy_converter_initialization_info) (copy_converter_initialization_info), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv), tp/Texinfo/XS/convert/html_prepare_converter.c (load_htmlxref_files), tp/Texinfo/XS/main/converter_types.h (CONVERTER_INITIALIZATION_INFO) (CONVERTER): remove texinfo_language_config_dirs from converter and initialization info. Set htmlxref_dirs from the TEXINFO_LANGUAGE_DIRECTORIES customization variable. * tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup): get texinfo_language_config_dirs as a STRING_LIST and use add_option_strlist_value and a copy to set TEXINFO_LANGUAGE_DIRECTORIES. * tp/Texinfo/XS/teximakehtml.c (main): set texinfo_language_config_dirs as a string list. Add the converter_texinfo_language_config_dirs to prepend the current directory and input_directory and pass to txi_converter_setup. * tp/Texinfo/XS/convert/html_prepare_converter.c (clear_string_variables_list, parse_htmlxref_files): clear and free variables lists and lines. 2024-08-25 Patrice Dumas * tp/ext/latex2html.pm (l2h_process), tp/ext/tex4ht.pm (tex4ht_prepare): create destination directory unless it is sure that it is the current directory. * tp/Texinfo/Common.pm (encode_file_name): add an intermediary variable. 2024-08-25 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (find_perl_converter_class_converter_format): handle class_name being NULL. * tp/Texinfo/XS/convert/ConvertXS.xs (converter_defaults): initialize class_name. 2024-08-25 Patrice Dumas * tp/texi2any.pl (%ignored_formats, %converter_format_format_name) (_format_expanded_formats, set_format): do not set default expanded formats in set_format, but after the format has been setup. Keep track of ignored formats to be able to remove them from defaults expanded formats at that time. 2024-08-24 Patrice Dumas * tp/Texinfo/Convert/IXINSXML.pm (%defaults): do not set output_format, let it be set by the caller. 2024-08-24 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (%common_converters_defaults), tp/Texinfo/Convert/DocBook.pm (%defaults), tp/Texinfo/Convert/HTML.pm (%defaults), tp/Texinfo/Convert/IXINSXML.pm (%defaults) (converter_initialize), tp/Texinfo/Convert/LaTeX.pm (%defaults), tp/Texinfo/Convert/Plaintext.pm (%defaults), tp/Texinfo/Convert/TexinfoSXML.pm (%defaults), tp/Texinfo/Convert/TexinfoXML.pm (%defaults), tp/Texinfo/XS/convert/converter.c (apply_converter_info) (destroy_converter_initialization_info) (copy_converter_initialization_info, free_generic_converter), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv), tp/Texinfo/XS/convert/html_converter_init_options.c (html_converter_defaults), tp/Texinfo/XS/main/build_perl_info.c (pass_generic_converter_to_converter_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER_INITIALIZATION_INFO) (CONVERTER): remove 'converted_format' from converters defaults. It should never give a different information than the module name. Remove the similar information in C too. * tp/t/test_converter_option.t: remove tests related to converted_format. 2024-08-24 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (set_converter_init_information): remove enum converter_format argument. Update callers. 2024-08-24 Patrice Dumas * tp/Texinfo/Convert/Info.pm (format_warn_strong_note), tp/Texinfo/Convert/Plaintext.pm (format_warn_strong_note, _convert): add format_warn_strong_note methods to Plaintext.pm and Info.pm to determine if Note in @strong requires a warning, instead of using 'converted_format'. That way it is certain that it is a property of the Converter. 2024-08-24 Patrice Dumas * tp/Texinfo/XS/main/get_perl_info.c (get_sv_options): inline get_sorted_options_key_sv_option in get_sv_options. Remove get_sorted_options_key_sv_option. * tp/Texinfo/XS/main/get_perl_info.c: remove get_sv_configured_options. 2024-08-24 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (%XS_overrides, get_conf, set_conf): (force_conf), tp/Texinfo/XS/convert/ConvertXS.xs (set_conf, get_conf) (force_conf): directly override get_conf, set_conf and force_conf. Remove _XS_get_conf, _XS_set_conf and _XS_force_conf. * tp/Texinfo/XS/convert/ConvertXS.xs (set_conf, get_conf, force_conf), tp/Texinfo/XS/main/DocumentXS.xs (document_get_conf), tp/Texinfo/XS/main/build_perl_info.c (latex_build_options_for_convert_to_latex_math), tp/Texinfo/XS/main/get_perl_info.c: inline and remove set_sv_conf, force_sv_conf and build_sv_option_from_name. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/convert/format_html.c (html_convert_heading_command): remove code related to in_skipped_node_top that was readded during rebasing, but should have stayed out since 2024-09-05 "set in_skipped_node_top when opening a @node (or associated @part), not after processing the contents.". 2024-10-05 Patrice Dumas * tp/Texinfo/XS/convert/html_converter_finish.c (reset_html_targets_list): free command_description. * tp/Texinfo/XS/convert/convert_html.c: remove duplicate default_css_string_format_protect_text, the function used is in format_html.c. * tp/Texinfo/XS/convert/format_html.c (html_command_description): do not set immediately a variable. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_command_description): remove build_html_formatting_state call, there is nothing set in C that needs to be passed. * tp/Texinfo/XS/convert/format_html.c (html_command_description): add const. 2024-10-05 Patrice Dumas * tp/Makefile.am (MAINTAINERCLEANFILES): add Texinfo/Data.pm. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_LIBADD): reorder libraries. 2024-10-05 Patrice Dumas * tp/Texinfo/XS/Makefile.am (EXTRA_DIST) (C_libtexinfo_convert_sources): remove converters_defaults.c, add call_html_cxx_function.cpp. 2024-08-23 Patrice Dumas * tp/maintain/lib/libintl-perl: update to libintl-perl-1.33. 2024-08-23 Patrice Dumas Add C++ code to have an hashmap when Perl is not used * tp/Texinfo/XS/configure.ac (AC_PROG_CXX, HAVE_CXX_HASHMAP): call AC_PROG_CXX to find a C++ compiler, test that a code with an unordered map compiles, and set HAVE_CXX_HASHMAP if so. * tp/Texinfo/XS/main/text.c (xvasprintf): use format instead of template, template seems to be reserved when compiled as C++, even in extern "C". * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES) (EXTRA_DIST), tp/Texinfo/XS/convert/call_html_cxx_function.cpp (init_registered_ids_hashmap, is_hashmap_registered_id) (hashmap_register_id, clear_registered_ids_hashmap) (free_registered_ids_hashmap), tp/Texinfo/XS/main/converter_types.h (enum ids_data_type, CONVERTER): add an implementation of the registered id interface using an unordered_map in call_html_cxx_function.cpp. Add converter registered_ids_hashmap field and associated ids_data_type. * tp/Texinfo/XS/convert/converter.c (new_converter), tp/Texinfo/XS/convert/html_converter_finish.c (html_reset_converter) (html_free_converter), tp/Texinfo/XS/convert/html_prepare_converter.c (html_converter_customize, html_id_is_registered, html_register_id): call C++ hashmap interface functions if ids_data_type is IDT_cxx_hashmap. * tp/Texinfo/XS/convert/converter.c (converter_converter): set CONVF_cxx_hashmap. 2024-08-22 Patrice Dumas * tp/Texinfo/XS/convert/call_html_perl_function.c (clear_registered_ids_hv, free_registered_ids_hv), tp/Texinfo/XS/convert/html_converter_finish.c (html_reset_converter) (html_free_converter), tp/Texinfo/XS/convert/replace_perl_call_html_function.c (clear_registered_ids_hv, free_registered_ids_hv): reset or free data only if it has been set, in particular if a converter is free'd right after having been setup. 2024-08-22 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: remove leading directory in #include generated for options_types.h. 2024-08-24 Patrice Dumas * tp/Texinfo/XS/convert/format_html.c (external_node_href), tp/Texinfo/XS/convert/html_prepare_converter.c (parse_htmlxref_files): no warning for an empty URL prefix, instead set it as an empty string. 2024-08-21 Patrice Dumas Implement reading xhtmlxref in C and XS * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): encode file name for error message if close failed. * tp/Texinfo/XS/convert/converter.c (apply_converter_info) (destroy_converter_initialization_info) (copy_converter_initialization_info), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER_INITIALIZATION_INFO, CONVERTER): add texinfo_language_config_dirs field in CONVERTER and in texinfo_language_config_dirs in CONVERTER_INITIALIZATION_INFO, pass information in apply_converter_info and get from Perl. * tp/Texinfo/XS/main/utils.c (locate_file_in_dirs): add. * tp/Texinfo/XS/convert/html_prepare_converter.c (STRING_VARIABLE_INFO, STRING_VARIABLES_LIST, set_variable_value) (read_var_len, substitute_variables, get_create_htmlxref_manual) (fill_source_info_file, parse_htmlxref_files, load_htmlxref_files), tp/Texinfo/XS/main/converter_types.h (HTMLXREF_MANUAL_LIST): implement reading xhtmlxref files in C. * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_beginning), tp/Texinfo/XS/convert/build_html_perl_state.c (build_htmlxref) (html_pass_xtmlxref), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_get_customization_sv): XS interface to build xhtmlxref information to Perl. Do not get xhtmlxref information from Perl anymore. * tp/Texinfo/XS/Makefile.am (AM_CPPFLAGS), tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup), tp/Texinfo/XS/teximakehtml.c (main): pass sysconfidir in AM_CPPFLAGS. Add texinfo_language_config_dirs argument to txi_converter_setup to setup texinfo_language_config_dirs, and set the list of texinfo_language_config_dirs in teximakehtml.c main. 2024-08-18 Patrice Dumas * tp/Texinfo/XS: run gnulib-tool --add-import euidaccess * tp/Texinfo/XS/convert/html_prepare_converter.c (load_htmlxref_files): start of load_htmlxref_files implementation. * tp/Texinfo/Convert/HTML.pm: add a comment. 2024-08-18 Patrice Dumas Comments on potential overflows, change in associated comments 2024-08-18 Patrice Dumas * tp/t/converters_tests.t (form_feeds), tp/Makefile.tres: add parts of t/03coverage_braces.t form_feed_in_brace_commands test relevant. Remove t/03coverage_braces.t form_feed_in_brace_commands. Add an include, changes in TODO/comments/FIXME. 2024-08-18 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (set_converter_init_information) (free_generic_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add format_defaults_conf OPTIONS field to converter. Set format_defaults_conf OPTIONS structure based on format_defaults options list in set_converter_init_information. * tp/Texinfo/XS/convert/html_prepare_converter.c (html_converter_initialize_beginning): use self->format_defaults_conf to set MAX_HEADER_LEVEL if < 0. * tp/Texinfo/XS/convert/html_prepare_converter.c (html_setup_output): use txi_base_options to set HANDLER_FATAL_ERROR_LEVEL if < 0. * tp/Texinfo/XS/convert/format_html.c (html_default_format_heading_text): simplify setting heading level, doing as in Perl. * tp/Texinfo/XS/convert/converter.c (converter_converter): assume that format_defaults is always set. 2024-08-18 Patrice Dumas * tp/Texinfo/XS/Makefile.am (BUILT_SOURCES, options_init_free.c), (libtexinfo_convert_la_SOURCES, EXTRA_DIST): rename convert/converters_defaults.c as convert/converters_options.c. Update users. * tp/Texinfo/XS/convert/converter.c (init_generic_converter), tp/Texinfo/XS/main/customization_options.c (setup_sorted_options) (new_sorted_options), tp/Texinfo/XS/main/get_perl_info.c (init_copy_sv_options), tp/Texinfo/XS/main/document.c (initialize_document_options), tp/maintain/regenerate_C_options_info.pl: pass OPTION pointers array to setup_sortable_options and to setup_sorted_options. Add new_sorted_options that allocate an OPTION pointers array and call setup_sortable_options and setup_sorted_options. Update callers. * tp/Texinfo/XS/main/customization_options.c (txi_initialise_base_options, txi_base_options) (txi_base_sorted_options), tp/maintain/regenerate_C_options_info.pl, tp/Texinfo/XS/main/document.c (txi_setup_lib_data): put txi_base_sorted_options in customization_options.c. Add txi_base_options with the options set to their default values. Set txi_base_sorted_options dynamically, associated to txi_base_options in txi_initialise_base_options in customization_options.c. Call txi_initialise_base_options in txi_setup_lib_data. * tp/maintain/regenerate_C_options_info.pl: generate html_fill_options_directions in converters_options.c. Add all header files where functions are defined. 2024-08-18 Patrice Dumas * tp/Texinfo/XS/main/document.c (txi_setup_lib_data), tp/Texinfo/XS/convert/converter.c (converter_setup): add txi_setup_lib_data in document.c for library main initialization. Call set_element_type_name_info in txi_setup_lib_data, and call txi_setup_lib_data in converter_setup. Minor other changes. 2024-08-18 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: rename functions setting options defaults. Set correctly non integer/string options. Add a function to set all options defaults. 2024-08-18 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c: reorder code, add form feed delimited sections. 2024-08-18 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES, BUILT_SOURCES) (MAINTAINERCLEANFILES, main/options_defaults.c), tp/maintain/regenerate_C_options_info.pl: separate converter options defaults and other options defaults generated code files. 2024-08-18 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: reorder code, add comments in output. Pre-sort setup_sortable_options output. 2024-08-18 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: do not generate set_option_key_configured anymore, it is unused and there is a better version. 2024-08-17 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c (set_informative_command_value, set_global_document_command), tp/Texinfo/XS/main/utils.c: move set_informative_command_value and set_global_document_command to customization_options.c. * tp/Texinfo/XS/main/document.c (set_output_encoding), tp/Texinfo/XS/main/utils.c: move set_output_encoding to document.c. * tp/Texinfo/XS/main/document.c (initialize_document_options): call option_set_conf. * tp/Texinfo/XS/main/utils.c: remove now unused set_conf_string. 2024-08-17 Patrice Dumas * tp/t/input_files/last_file_same_parser.texi: add an @include. 2024-08-17 Patrice Dumas * tp/t/30sectioning.t (in_menu_only_special_spaces_node), tp/t/40moresectioning.t (only_special_spaces_node), tp/t/input_files/in_menu_only_special_spaces_node.texi, tp/t/input_files/only_special_spaces_node.texi: move TODO information out of texi files to .t files. 2024-08-17 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (fill_output_units_descriptor_av): store the document descriptor along with output_units descriptor in the Perl output units data, as both the document and output units list number in document are needed to retrieve the output units list in C. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_output_units_descriptor) (get_sv_output_units): add a document out argument in get_sv_output_units_descriptor and find the document associated with the output units if set. If the document argument of get_sv_output_units is NULL, call get_sv_output_units_descriptor such as to find the document. Update callers. * tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (split_pages): remove document SV argument, as there is no such argument in Perl and get the document from the output units list SV. * tp/t/test_utils.pl: add comments to explain why descriptors added to output units by XS code to retrieve output units descriptor and document descriptor do not show up in tests results. 2024-08-17 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv), tp/Texinfo/XS/main/build_perl_info.c (pass_generic_converter_to_converter_sv): always pass output_format and converted_format to Perl. Do not put them in non_valid_customization options information. * tp/Makefile.tres, tp/t/test_converter_option.t: new tests file testing converters set/get converted_format and output_format. 2024-08-17 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (_generic_converter_init), tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init): do not pass class to generic_converter_init, get it through ref and equivalent in XS. * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv): get class_name as argument only. If NULL, no error message. * tp/Texinfo/XS/convert/ConvertXS.xs (converter_defaults): call get_converter_info_from_sv without class name argument to avoid a duplicate message. 2024-08-17 Patrice Dumas * tp/Texinfo/XS/convert/html_converter_init_options.c, tp/Texinfo/XS/convert/html_prepare_converter.c (html_converter_initialize_beginning): move html_converter_initialize_beginning to html_prepare_converter.c. * tp/Texinfo/XS/main/converter_types.h (TARGET_CONTENTS_FILENAME) (FILE_NAME_PATH, TARGET_DIRECTORY_FILENAME), tp/Texinfo/XS/main/utils.h: move struct declarations to converter_types.h. 2024-08-17 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup): use add_option_string_value with txi_base_sorted_options instead of add_new_option_value to get the option type based on the name. 2024-08-17 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: setup txi_base_sorted_options sorted options information, to be able to find type and number of options, even without a converter. * tp/Texinfo/XS/convert/ConvertXS.xs (converter_defaults): use txi_base_sorted_options. 2024-08-17 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init), tp/Texinfo/XS/convert/get_converter_perl_info.c: inline converter_get_info_from_sv in generic_converter_init. * tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init): rename class variable as class_name. * tp/Texinfo/XS/convert/converter.c (set_converter_init_information): call apply_converter_info on user_conf only if user_conf is non-NULL. * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv), tp/Texinfo/XS/convert/ConvertXS.xs (converter_defaults, generic_converter_init): create CONVERTER_INITIALIZATION_INFO in get_converter_info_from_sv if the input SV is not undef and return it. Update callers. * tp/Texinfo/XS/convert/ConvertXS.xs (converter_defaults) (generic_converter_init), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add format_defaults field in CONVERTER. If the converter_defaults argument is a converter, store format_defaults in converter and return undef to Perl in converter_defaults. In generic_converter_init, if there is no format_defaults from Perl, take C converter format_defaults. This avoids building to Perl and getting from Perl. 2024-08-16 Patrice Dumas No converter information in converter_defaults, and XS override * tp/Texinfo/XS/main/customization_options.c (copy_option): copy direction_string field. * tp/Texinfo/XS/main/customization_options.c (add_new_button_option): add based on tp/Texinfo/XS/teximakehtml.c code. * tp/Texinfo/XS/convert/get_converter_perl_info.c (new_numbered_option_from_sv): rename new_option_from_sv as new_numbered_option_from_sv. * tp/Texinfo/XS/convert/converter.c (find_format_name_converter_format): rename find_format_data_index as find_format_name_converter_format. Update callers. * tp/Texinfo/XS/convert/converter.c (set_generic_converter_options): new separate function for clearer code. * tp/Texinfo/XS/main/utils.c (direction_unit_direction_name), tp/Texinfo/XS/main/build_perl_info.c (html_build_button): add the direction_unit_direction_name function that directly uses html_button_direction_names for directions that are not special units directions, such as to have a direction name for those directions even if there is no converter. Use in html_build_button. * tp/Texinfo/XS/main/build_perl_info.c (html_build_buttons_specification): update external_references_number only if there is a converter. With the change in html_build_button, the function can be used with a NULL converter. * tp/maintain/regenerate_C_options_info.pl, tp/Texinfo/XS/convert/html_converter_init_options.c (add_html_default_buttons_specifications) (add_texi2html_default_buttons_specifications): generate add_*_regular_options_defaults that add option categories or converter options to an option list. Add add_html_default_buttons_specifications and add_texi2html_default_buttons_specifications to similarily add buttons to an option list. * tp/Texinfo/XS/convert/html_converter_init_options.c (html_converter_defaults), tp/Texinfo/XS/convert/converter.c (converter_defaults, converter_converter), tp/Texinfo/XS/convert/converter.h (CONVERTER_FORMAT_DATA): pass converter_format instead of converter to converter_defaults. Have html_converter_defaults return the format_defaults options in the CONVERTER_INITIALIZATION_INFO return value. Do not consider that options are numbered in converter_defaults. Call number_options_list on format_defaults returned by converter_defaults, as without converter in format_defaults, it is unlikely for options to be numbered. * tp/Texinfo/XS/convert/converter.c (find_perl_converter_class_converter_format), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_or_create_sv_converter): add find_perl_converter_class_converter_format based on get_or_create_sv_converter code to get converter_format based on Perl class. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (converter_defaults), tp/Texinfo/XS/main/build_perl_info.c (build_sv_options_from_options_list): rename html_converter_defaults in ConvertXS.xs as converter_defaults. Add override of converter_defaults for HTML. Never use a converter to generate the returned Perl information. For that, determine the class name based on SvSTASH or the converter_in SV considered as a string, then the converter_format using find_perl_converter_class_converter_format. Also setup asorted options without a converter, to be able to call get_converter_info_from_sv. Call converter_defaults to return a CONVERTER_INITIALIZATION_INFO. Add build_sv_options_from_options_list to build Perl options hash based on a OPTIONS_LIST. Call build_sv_options_from_options_list in ConvertXS.xs converter_defaults override in to return converter default Perl hash. * tp/Texinfo/XS/convert/html_converter_init_options.c (set_html_default_buttons_specifications) (set_texi2html_default_buttons_specifications): pass converter and options separately. 2024-08-16 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.h, tp/Texinfo/XS/convert/html_prepare_converter.h: comment out function definitions already done in html_conversion_api.h or html_converter_api.h. 2024-08-16 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/html_converter_api.h, tp/Texinfo/XS/convert/html_conversion_api.h: split html_converter_api.h in two with high level API only remaining in html_converter_api.h, lower level API goes to html_conversion_api.h. * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES): remove tp/Texinfo/XS/convert/html_converter_init_options.h and tp/Texinfo/XS/convert/html_converter_finish.h, html_converter_api.h should be used instead. 2024-08-16 Patrice Dumas * tp/Texinfo/XS/main/customization_options.c (copy_numbered_options_list_options): rename copy_options_list_options to copy_numbered_options_list_options. Update callers. * tp/Texinfo/XS/main/customization_options.c (add_option_copy) (copy_options_list): remove sorted_options argument, it is not used. * tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_or_create_sv_converter): add get_or_create_sv_converter with code mostly from generic_converter_init, to setup a new converter only if there was not one already. * tp/Texinfo/XS/convert/converter.c (set_converter_init_information): do not call CONVERTER_FORMAT_DATA converter_defaults in set_converter_init_information. It is better not to call it here as it is not called in _generic_converter_init, it should better be done in an overriden converter_defaults or a C only function. * tp/Texinfo/XS/main/customization_options.c (number_options_list): add to number options in list, typically if they were set without a converter (without sorted options) and options with nembers are expected. * tp/Texinfo/XS/convert/converter.c (converter_format_data) (copy_converter_initialization_info, converter_defaults) (converter_initialize, converter_converter), tp/Texinfo/XS/convert/html_converter_api.c (html_converter_initialize), tp/Texinfo/XS/convert/html_converter_init_options.c (html_converter_defaults): add a converter_converter function to have an interface similar to the Perl converter interface. Add converter_initialize and converter_defaults to dispatch to format specific functions. Get specific format defaults as converter_defaults return. Set/update HTML functions for this change. * tp/Texinfo/XS/convert/texinfo.c (txi_converter): call converter_converter. * tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup): add based on former txi_converter_initialize but updated to match the changes in converter interface. * tp/Texinfo/XS/teximakehtml.c (add_new_button_option, main): setup customizations as a list without converter. Use txi_converter_setup. * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_defaults): prepare XS override for HTML converter_defaults, using get_or_create_sv_converter and html_converter_defaults. Do not use it, though, as it should work when called from a converter, but not from a class. 2024-08-15 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_XS_html_converter_get_customization) tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_get_customization_sv), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_get_customization_sv): rename html_converter_get_customization_sv as _XS_html_converter_get_customization. * tp/Texinfo/XS/convert/html_converter_init_options.c (html_converter_initialize_beginning): rename html_converter_initialize as html_converter_initialize_beginning. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_XS_html_converter_initialize_beginning, converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_beginning), tp/Texinfo/XS/convert/converter.c (set_converter_init_information), tp/Texinfo/XS/convert/texinfo.c (txi_converter_initialize): add an XS override html_converter_initialize_beginning that is called at the beginning of converter_initialize in Perl as _XS_html_converter_initialize_beginning if XS is set. Call html_converter_initialize_beginning in this override and in txi_converter_initialize. Do not call html_converter_initialize_beginning in set_converter_init_information anymore. The objective is to avoid to have the initialization necessarily split in two in C. 2024-08-15 Patrice Dumas TODO: update text on libraries as there are now private API at diverse levels available for all the C codes with a good cover. 2024-08-15 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/html_converter_api.c (html_output) (html_convert), tp/Texinfo/XS/convert/html_converter_api.h, tp/Texinfo/XS/convert/texinfo.c (txi_html_output): add html_converter_api.h with a selection of HTML conversion functions that allow to set up and destroy a converter and implement output() and convert(). Add html_output using code form texinfo.c. Add html_convert implementation. 2024-08-15 Patrice Dumas * tp/Texinfo/XS/convert/html_conversion_state.c (compare_global_units_direction_name) (html_find_direction_name_global_unit), tp/Texinfo/XS/convert/html_prepare_converter.c: move html_find_direction_name_global_unit to html_conversion_state.c and duplicate compare_global_units_direction_name. 2024-08-15 Patrice Dumas * tp/Texinfo/XS/convert/format_html.c: move code around to have all formatting functions together. Add more sections delimited by line feeds. 2024-08-15 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_convert_tree_append): rename convert_tree_append as html_convert_tree_append. Update callers. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/format_html.c (html_command_description): move html_command_description to format_html.c. * tp/Texinfo/XS/convert/format_html.c (html_default_format_begin_file) (html_default_format_node_redirection_page) (html_default_format_special_body_about): fix function names. 2024-08-15 Patrice Dumas * tp/Texinfo/XS/convert/html_converter_types.h: declare translated_special_unit_info, direction_string_type_names, direction_string_context_names, html_conversion_context_type_names, html_argument_formatting_type_names and html_stage_handler_stage_type_names. * tp/Texinfo/XS/convert_html.c (html_close_lone_element) (convert_tree_append): rename close_html_lone_element as html_close_lone_element, convert_to_html_internal as convert_tree_append and translate_convert_to_html_internal as html_translate_convert_tree_append. * tp/Texinfo/XS/convert_html.c (html_default_format_jslicense_file) (html_default_format_date_in_header): split functions formatting HTML out of do_jslicenses_file and html_convert_output. * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/format_html.c, tp/Texinfo/XS/convert_html.c: split convert_html.c, moving the formatting to HTML to format_html.c, including html_default_format_jslicense_file and html_default_format_date_in_header, keeping only higher level conversion functions in convert_html.c. * tp/Texinfo/XS/convert_html.c (html_convert_string_tree_new_formatting_context) (html_convert_tree_new_formatting_context, html_convert_css_string): prepend html_ and declare in header file. * tp/Texinfo/XS/format_html.c (html_format_title_titlepage) (html_format_node_redirection_page, html_format_comment) (html_format_end_file, html_format_begin_file): prepend html_ and declare in header file. 2024-08-15 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c: rename convert_to_html_internal as convert_tree_append. 2024-08-15 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c: add a form feed delimited code section for html_attribute_class. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c: group codes: string functions, targets related code, conversion preparation code and node redirection page code. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/html_prepare_converter.c (html_id_is_registered) (html_register_id): move html_id_is_registered and html_register_id to html_prepare_converter.c. * tp/Texinfo/XS/convert/convert_html.c: move translations related code around to group code, and move the whole above. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c: move code around to group code for different phases better together and get a more logical order of code phases. * tp/Texinfo/XS/convert/html_converter_finish.c: update includes. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_clear_direction_string_type) (html_reset_translated_special_unit_info_tree): prepend clear_direction_string_type and reset_translated_special_unit_info_tree with html_ and put in header file. * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/html_converter_finish.c (reset_special_unit_info_list, free_special_unit_info_list) (reset_html_targets_list, reset_html_targets, clear_type_explanations) (html_reset_files_source_info, html_free_files_source_info) (html_destroy_files_source_info, html_reset_converter) (free_html_no_arg_command_conversion, html_free_converter), tp/Texinfo/XS/convert/convert_html.c: move reset and free converter functions to a new file convert/html_converter_finish.c, which has already a header file, but was previously implemented in convert_html.c. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_free_converter): remove the two duplications of html_reset_converter code, they are not useful as html_reset_converter should always be called. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/html_prepare_converter.h: get declaration of functions in html_prepare_converter.c. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/html_prepare_converter.c (html_global_unit_direction_names, html_formatting_reference_names) (html_add_special_unit_info, new_special_unit_info_type) (new_special_unit_formatting_references, new_htmlxref_manual_list) (initialize_js_categories_list, initialize_jslicense_files): move functions and variables to html_prepare_converter.c. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_setup_output_simple_page), tp/Texinfo/XS/convert/html_prepare_converter.c (html_set_pages_files): readd self->pending_closes initialization that disappeared. * tp/Texinfo/XS/convert/convert_html.c (html_command_description): call html_get_target instead of find_element_target. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_get_target): call directly find_element_target_search and not find_element_target. Remove find_element_target, replace with html_get_target calls. * tp/Texinfo/XS/convert/convert_html.c (html_get_top_unit) (html_set_file_source_info, html_add_to_files_source_info) (html_find_file_source_info, html_setup_output_simple_page): prepend html_ and declare. * tp/Texinfo/XS/convert/html_prepare_converter.c (html_get_target) (html_prepare_output_units_global_targets) (compare_global_units_direction_name, add_to_unit_file_name_paths) (html_setup_global_units_direction_names) (html_find_direction_name_global_unit, html_set_pages_files) (prepare_special_units_directions, compare_page_name_number) (html_prepare_units_directions_files), tp/Texinfo/XS/convert/convert_html.c: move html_get_target, html_prepare_output_units_global_targets, compare_global_units_direction_name, html_setup_global_units_direction_names, html_find_direction_name_global_unit, add_to_unit_file_name_paths, html_set_pages_files, prepare_special_units_directions and html_prepare_units_directions_files to html_prepare_converter.c. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_normalized_to_id) (html_normalized_label_id_file): prepend normalized_to_id and normalized_label_id_file with html_ and declare in header file. Update callers. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/html_prepare_converter.c (add_element_target_to_list, add_element_target, add_special_target) (set_special_units_targets_files, unique_target) (prepare_associated_special_units_targets) (new_sectioning_command_target, set_root_commands_targets_node_files) (prepare_index_entries_targets, compare_footnote_id) (find_footnote_id_number, footid_base, docid_base) (prepare_footnotes_targets, heading_commands_list) (set_heading_commands_targets, check_targets_order, sort_cmd_targets) (html_prepare_conversion_units_targets): move add_element_target_to_list, add_element_target, add_special_target, unique_target, set_special_units_targets_files, prepare_associated_special_units_targets, new_sectioning_command_target, set_root_commands_targets_node_files, prepare_index_entries_targets, prepare_footnotes_targets, heading_commands_list, set_heading_commands_targets, check_targets_order, sort_cmd_targets and html_prepare_conversion_units_targets to html_prepare_converter.c. duplicate compare_footnote_id and compare_element_target. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_run_stage_handlers): prefix run_stage_handlers with html_ and declare it in header file. Update callers. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/html_prepare_converter.c (init_conversion_after_setup_handler, html_process_css_file) (html_prepare_css, fill_jslicense_file_info, html_setup_output) (html_setup_convert): move to html_prepare_converter.c. 2024-08-14 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_html_convert_output, _setup_output), tp/Texinfo/XS/convert/convert_html.c (html_setup_output) (html_convert_output): create directory at the very beginning of html_convert_output, not in setup_output, to delay modifications to the start of the conversion. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/html_prepare_converter.c (commands_internal_open_table): remove duplicate commands_internal_open_table from convert_html.c, add html_open_node_part_command. * tp/Texinfo/XS/convert/convert_html.h: declare node_part_command open function. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/html_converter_types.h (SPECIAL_LIST_MARK_CSS_NO_ARGS_CMD, COMMAND_ARGS_SPECIFICATION) (MAX_COMMAND_ARGS_NR, html_command_args_flags) (special_list_mark_css_string_no_arg_command, no_arg_formatted_cmd) (style_formatted_cmd, accent_cmd, format_raw_cmd), tp/Texinfo/XS/convert/convert_html.c: rename command_args_flags as html_command_args_flags, substitute_html_non_breaking_space as html_substitute_non_breaking_space. Declare in html_converter_types.h. * tp/Texinfo/XS/convert/convert_html.h (ROOT_AND_UNIT), tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element) (html_after_escaped_characters, html_substitute_non_breaking_space) (html_special_unit_info, html_default_format_protect_text) (html_complete_no_arg_commands_formatting): declare ROOT_AND_UNIT and html_get_tree_root_element in header file. Rename substitute_html_non_breaking_space as html_substitute_non_breaking_space. Prepend html_ for some functions and declare them in header file. Update callers. * tp/Texinfo/XS/convert/convert_html.h, tp/Texinfo/XS/convert/convert_html.c: prepend html_ for css_string_convert*, convert_*command, command_conversion_external, command_open_external, open_*command, type_conversion_external, convert_*type, css_string_convert_*type, type_open_external, output_unit_conversion_external, convert_*unit, special_unit_body_formatting_external, default_format_special_body_* and declare in header file. * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/html_prepare_converter.c (html_format_setup) (html_converter_customize, html_initialize_output_state) (new_directions_strings_type, new_directions_strings_translated_type) (CMD_VARIETY, COMMAND_INTERNAL_CONVERSION, COMMAND_INTERNAL_OPEN) (TYPE_INTERNAL_CONVERSION, TYPE_INTERNAL_OPEN) (OUTPUT_UNIT_INTERNAL_CONVERSION) (SPECIAL_UNIT_BODY_INTERNAL_CONVERSION) (base_default_css_element_class_styles, default_code_types) (default_pre_class_types, quoted_style_commands, ignored_types) (htmlxref_split_type_names, command_special_unit_variety) (default_no_arg_commands_formatting, special_characters_formatting) (default_style_commands_formatting, html_commands_data) (default_commands_args, register_special_unit, SPECIAL_UNIT_ORDER) (compare_special_units, prepare_special_units) (additional_format_context_cmd, HTML_align_cmd) (register_format_context_command, register_pre_class_command) (conf_for_special_units, html_prepare_conversion_units) (compare_index_name, html_prepare_conversion_units): move code related to converter and conversion preparation to a new file, html_prepare_converter.c. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/html_prepare_converter.c (html_converter_init_special_unit): move html_converter_init_special_unit to html_prepare_converter.c. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/convert/html_conversion_state.h: declare html_register_opened_section_level and html_close_registered_sections_level. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/convert/html_conversion_state.c (html_get_css_info_spec): move from get_html_perl_info.c to html_conversion_state.c. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/html_conversion_state.c (css_info_type_names) (count_elements_in_filename_type_names, push_html_formatting_context) (pop_html_formatting_context, html_new_document_context) (html_pop_document_context, html_open_command_update_context) (html_convert_command_update_context, html_open_type_update_context) (html_convert_type_update_context, html_set_multiple_conversions) (html_unset_multiple_conversions, find_explained_command_string) (register_explained_command_string, source_info_id) (html_check_htmlxref_already_warned) (initialize_css_selector_style_list): move from convert_html.c to html_conversion_state.c. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/convert/html_conversion_state.h: declare html_register_opened_section_level and html_close_registered_sections_level. 2024-08-14 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/html_converter_types.h (HTML_COMMAND_STRUCT) (enum count_elements_in_filename_type, enum css_info_type), tp/Texinfo/XS/convert/html_conversion_state.c (html_in_code) (html_in_math, html_in_preformatted_context, html_inside_preformatted) (html_in_non_breakable_space, html_in_raw, html_in_space_protected) (html_in_string, html_in_upper_case, html_in_verbatim) (html_paragraph_number, html_preformatted_number, html_in_align) (html_top_block_command, html_preformatted_classes_stack) (html_set_code_context, html_pop_code_context) (html_set_string_context, html_unset_string_context) (html_set_raw_context, html_unset_raw_context, html_in_multi_expanded) (find_page_name_number, count_elements_in_file_number) (html_count_elements_in_filename, html_register_footnote) (html_get_pending_footnotes, destroy_pending_footnotes) (html_register_pending_formatted_inline_content) (html_cancel_pending_formatted_inline_content) (html_get_pending_formatted_inline_content) (get_associated_inline_content_number) (html_associate_pending_formatted_inline_content) (html_get_associated_formatted_inline_content) (add_associated_file_info_integer, html_register_file_information) (lookup_associated_file_info, html_get_file_information) (html_register_opened_section_level) (html_close_registered_sections_level, compare_selector_style) (sort_css_element_class_styles, find_css_selector_style) (html_css_set_selector_style, html_css_get_selector_style) (compare_strings, html_get_css_elements_classes, html_css_add_info) (html_css_get_info), tp/Texinfo/XS/convert/convert_html.c: split code related to setting or getting HTML conversion state information out of convert_html.c to a separate file html_conversion_state.c. Also add html_converter_types.h for declarations needed by several files used for the conversion to HTML. 2024-08-14 Patrice Dumas * tp/t/test_utils.pl (test): call convert_to_texinfo for plaintext test as it requires less resources, no need to set up a Parser. 2024-08-13 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_reset_converter) (txi_destroy_converter), tp/Texinfo/XS/teximakehtml.c: add wrappers for reset_converter and destroy_converter in texinfo.c and call them in teximakehtml.c. 2024-10-04 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: remove directory from generated include. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/teximakehtml.c: add missing include. 2024-08-13 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (new_converter): rename registered_converter as converter. * tp/Texinfo/XS/convert/converter.c (set_converter_init_information): rename converter_defaults as format_converter_defaults and converter_initialize as format_converter_initialize. * tp/Texinfo/XS/convert/converter.c (reset_generic_converter): add a function to reset parser structures tied to a document to be ready for a new conversion. * tp/Texinfo/XS/convert/converter.c (converter_format_data) (reset_converter, free_converter, destroy_converter), tp/Texinfo/XS/convert/converter.h (CONVERTER_FORMAT_DATA), tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/ConvertXS.xs (reset_converter, destroy), tp/Texinfo/XS/convert/convert_html.c (html_reset_converter): add references to specific format reset_converter and free_converter functions in CONVERTER_FORMAT_DATA. Set them for HTML, with declarations in the new file convert/html_converter_finish.h. Add reset_converter and free_converter in converter.c that call both the generic converter functions and function references from converter_format_data. Call those functions in ConvertXS.xs. Do not call free_generic_converter anymore in html_reset_converter. Add destroy_converter function with code of unregister_converter_descriptor, and call to free_converter. 2024-08-13 Patrice Dumas * tp/t/test_utils.pl (test): destroy PlainTexinfo converter. 2024-08-12 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs: reindent. * tp/Texinfo/XS/main/manipulate_tree.c: minor change. Changes in comments. 2024-08-12 Patrice Dumas * tp/Texinfo/XS/main/tree.c (reallocate_list_for) (insert_list_slice_into_list): use size_t for added elements number. * tp/Texinfo/XS/main/tree.c (remove_slice_from_contents): use size_t for indices. 2024-08-12 Patrice Dumas * tp/Texinfo/XS/main/tree.c (insert_list_slice_into_list) (insert_slice_into_contents, insert_list_slice_into_args) (insert_list_slice_into_contents): use size_t for indices. * tp/Texinfo/XS/structuring_transfo/structuring.c (insert_menu_comment_content): use size_t for index_in_preformatted. * tp/Texinfo/XS/parsetexi/def.c: reindent. 2024-08-12 Patrice Dumas * tp/Texinfo/XS/parsetexi/menus.c (handle_menu_entry_separators): determine a positive index for entry_name. * tp/Texinfo/XS/parsetexi/menus.c (end_line_menu_entry): use the position just after the index in loop. * tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph): use a for loop to find preceding @*indent. * tp/Texinfo/XS/main/tree.c (contents_child_by_index) (args_child_by_index): use size_t for indices. Remove the possibility to add at the end with a negative index, the caller should be able to compute the index. 2024-08-12 Patrice Dumas * tp/Texinfo/XS/parsetexi/def.c (gather_def_item): start indices from the end of the contents for a more readable code and avoid negative argument for contents_child_by_index. 2024-08-12 Patrice Dumas * tp/Texinfo/XS/main/tree.c (list_set_empty_contents) (remove_from_element_list, remove_from_const_element_list) (remove_from_contents, remove_from_args): use size_t for indices. Remove the possibility to add at the end with a negative index, it is not used and the caller should be able to compute the index. 2024-08-12 Patrice Dumas * tp/Texinfo/XS/main/tree.c (insert_into_element_list) (insert_into_contents, insert_into_args): have indices be size_t. Remove the possibility to add at the end with a negative index, it is not used and the caller should be able to compute the index. 2024-08-12 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (retrieve_converter) (unregister_converter_descriptor), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_sv_converter), tp/Texinfo/XS/main/build_perl_info.c: use size_t for converter descriptor consistently. * tp/Texinfo/XS/convert/ConvertXS.xs (html_get_target), tp/Texinfo/XS/convert/convert_html.c (prepare_special_units) (html_prepare_conversion_units) (html_prepare_output_units_global_targets) (html_prepare_units_directions_files), tp/Texinfo/XS/convert/get_html_perl_info.c (html_find_element_from_sv) (get_output_units_descriptor_converter_sv) (element_converter_from_sv), tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/main/get_perl_info.c (get_sv_output_units_descriptor) (get_sv_output_units, find_root_command, find_element_from_sv), tp/Texinfo/XS/main/output_unit.c (retrieve_output_units) (split_by_node, split_by_section), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (split_by_node, split_by_section, rebuild_output_units): use size_t for output units descriptor consistently. * tp/Texinfo/XS/convert/converter.c (new_converter, id_to_filename) (free_comma_index_subentries_tree, find_output_unit_file) (free_output_unit_files_file), tp/Texinfo/XS/main/output_unit.c (unsplit, split_pages, units_directions, units_file_directions): use size_t instead of int where the variable could reach a value outside of the int range and also when the index is better represented by a size_t. Cast to/from int and size_t when needed. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c (build_no_arg_commands_formatting, build_html_files_source_info) (build_html_elements_in_file_count, build_html_translated_names) (build_html_command_formatted_args, build_replaced_substrings), tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element) (add_associated_file_info_integer, lookup_associated_file_info) (html_register_opened_section_level, prepare_special_units) (set_special_units_targets_files) (prepare_associated_special_units_targets) (set_root_commands_targets_node_files, html_get_css_elements_classes) (html_attribute_class, prepare_index_entries_targets) (prepare_footnotes_targets, set_heading_commands_targets) (html_prepare_output_units_global_targets, find_file_source_info) (html_reset_files_source_info, html_set_pages_files) (prepare_special_units_directions) (html_prepare_units_directions_files, html_default_format_contents) (html_default_format_end_file, get_links) (html_default_format_navigation_panel) (html_default_format_element_header, html_default_format_element_footer) (convert_heading_command, convert_inline_command, convert_sp_command) (convert_quotation_command, convert_tab_command, convert_unit_type) (default_format_special_body_about, html_converter_init_special_unit) (determine_non_default_special_unit_directions) (html_converter_customize, reset_html_targets_list) (html_initialize_output_state, html_conversion_finalization) (clear_type_explanations, html_reset_converter, html_free_converter) (html_translate_names, destroy_args_formatted) (html_convert_type_update_context, debug_print_html_contexts) (convert_to_html_internal, convert_output_unit) (convert_convert_output_unit_internal, html_convert_convert) (convert_output_output_unit_internal, html_convert_output) (html_node_redirections): use size_t instead of int where the variable could reach a value outside of the int range and also when the index is better represented by a size_t. Cast to/from int and size_t when needed. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning, move_index_entries_after_items) (reassociate_to_node): use number of elements and size_t in a first step before setting the indices. * tp/Texinfo/XS/main/document.c (add_other_global_info_string), tp/Texinfo/XS/main/manipulate_indices.c (destroy_indices_sorted_by_letter, destroy_indices_sortable_entries) (sort_indices_by_letter), tp/Texinfo/XS/structuring_transfo/structuring.c (sectioning_structure) (warn_non_empty_parts, get_node_node_childs_from_sectioning) (check_nodes_are_referenced, set_menus_node_directions) (section_direction_associated_node, complete_node_tree_with_menus) (nodes_tree, associate_internal_references, new_node_menu_entry) (insert_menu_comment_content, new_complete_node_menu) (print_down_menus, new_detailmenu), tp/Texinfo/XS/structuring_transfo/transformations.c (lookup_index_entry, relate_index_entries_to_table_items_in) (move_index_entries_after_items, insert_nodes_for_sectioning_commands) (reference_to_arg_internal, complete_node_menu) (complete_tree_nodes_missing_menu, regenerate_master_menu): use size_t instead of int where the variable could reach a value outside of the int range and also when the index is better represented by a size_t. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/main/utils.c (get_encoding_conversion): use a separate variable for utf8_missing case. Use size_t encoding_nr to find he number of the encoding, using 0 for not found. Also use size_t for encoding_index and set it when the case is known. * tp/Texinfo/XS/parsetexi/macro.c (lookup_macro_parameter) (expand_macro_body): have lookup_macro_parameter return index of argument +1, to be able to return a size_t and use 0 for not found. * tp/Texinfo/XS/convert/ConvertXS.xs (get_unclosed_stream) (html_close_registered_sections_level, html_get_css_elements_classes) (html_register_footnote), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv, html_set_shared_conversion_state), tp/Texinfo/XS/convert/texinfo.c (txi_parser), tp/Texinfo/XS/main/build_perl_info.c (build_expanded_formats), tp/Texinfo/XS/main/get_perl_info.c (apply_sv_parser_conf) (html_get_button_specification_list, find_root_command) (find_element_from_sv), tp/Texinfo/XS/main/translations.c (replace_substrings, substitute_element_array) (replace_convert_substrings), tp/Texinfo/XS/main/unicode.c (encoded_accents, unicode_point_decoded_in_encoding), tp/Texinfo/XS/main/utils.c (reset_encoding_list) (clear_expanded_formats, add_expanded_format, format_expanded_p) (expanded_formats_number, locate_include_file, clear_strings_list) (delete_global_info, get_global_document_command, is_content_empty), tp/Texinfo/XS/parsetexi/close.c (close_command_cleanup), tp/Texinfo/XS/parsetexi/commands.c (lookup_command) (wipe_user_commands), tp/Texinfo/XS/parsetexi/def.c (parse_def), tp/Texinfo/XS/parsetexi/end_line.c (end_line_def_line) (end_line_starting_block, end_line_misc_line), tp/Texinfo/XS/parsetexi/handle_commands.c (check_no_text) (handle_line_command), tp/Texinfo/XS/parsetexi/indices.c (space_for_indices, associate_command_to_index, init_index_commands) (set_non_ignored_space_in_index_before_command, complete_indices), tp/Texinfo/XS/parsetexi/macro.c (lookup_macro, expand_macro_arguments) (expand_linemacro_arguments, wipe_macros, handle_macro, store_value) (clear_value, fetch_value, lookup_infoenclose, add_infoenclose), tp/Texinfo/XS/parsetexi/menus.c (register_extra_menu_entry_information, end_line_menu_entry), tp/Texinfo/XS/parsetexi/parser.c (text_contents_to_plain_text) (merge_text), tp/Texinfo/XS/parsetexi/separator.c (check_empty_expansion): use size_t instead of int where the variable could reach a value outside of the int range and also when the index is better represented by a size_t. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/main/parser_conf.h (PARSER_CONF): use size_t for the descriptor field. * tp/Texinfo/XS/main/build_perl_info.c (build_perl_*) (element_to_perl_hash, build_additional_info, store_source_mark_list) (build_tree_to_build, build_string_list, build_elements_list) (build_errors, add_formatted_error_messages) (build_target_elements_list, build_identifiers_target) (build_internal_xref_list, build_float_types_list) (build_single_index_data, build_global_info, build_global_commands) (output_unit_to_perl_hash, build_filenames, build_file_counters) (build_out_filepaths, build_output_files_unclosed_files) (build_output_files_opened_files), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi) (convert_to_texinfo_internal), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents, definition_arguments_content) (definition_category_tree), tp/Texinfo/XS/main/debug.c, tp/Texinfo/XS/main/errors.c (wipe_error_messages), tp/Texinfo/XS/main/extra.c (get_associated_info_key) (lookup_associated_info, lookup_associated_info_by_index), tp/Texinfo/XS/main/get_perl_info.c (apply_sv_parser_conf) (find_index_entry_sv), tp/Texinfo/XS/main/node_name_normalization.c (convert_to_normalized_internal), tp/Texinfo/XS/main/parser_conf.c (retrieve_parser_conf): use size_t instead of int where the variable could reach a value outside of the int range and also when the index is better represented by a size_t. * tp/Texinfo/XS/main/get_perl_info.c (add_svav_to_string_list): use SSize_t instead of size_t for consistency. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/parsetexi/multitable.c (gather_previous_item): rename begin as begin_idx, end as end_pos and term_begin as term_begin_idx. Set directly begin_idx, end_pos and term_begin_idx to the value that is to be use if the command corresponding to the variable is not found. Use size_t instead of int. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info) (copy_tree_internal, remove_associated_copy_info, parse_node_manual) (modify_tree, normalized_menu_entry_internal_node, first_menu_node), tp/Texinfo/XS/main/tree.c (destroy_associated_info) (destroy_source_mark_list, destroy_element_and_children) (remove_element_from_list, add_element_if_not_in_list) (replace_element_in_list, next_bracketed_or_word_agg) (split_delimiters, split_def_args, parse_def), tp/Texinfo/XS/structuring_transfo/structuring.c (insert_menu_comment_content, new_complete_node_menu): replace int by size_t in situations where the variable could reach a value outside of the int range and also when the index is better represented by a size_t. 2024-08-11 Patrice Dumas Fix compiler warnings * tp/Texinfo/XS/convert/convert_html.c: put static before const in declarations. * tp/Texinfo/XS/convert/convert_html.c (html_cancel_pending_formatted_inline_content) (set_root_commands_targets_node_files), tp/Texinfo/XS/convert/get_html_perl_info.c (html_set_shared_conversion_state, html_get_shared_conversion_state), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/main/convert_utils.c (definition_arguments_content) (definition_category_tree, output_files_register_closed), tp/Texinfo/XS/main/manipulate_tree.c (remove_from_source_mark_list): modify code to remove useless conditions of positivity and negativity of size_t variables. * tp/Texinfo/XS/main/customization_options.c (copy_options_list): check if pointer is NULL, not if > 0. * tp/Texinfo/XS/main/convert_to_text.c (convert_def_line), tp/Texinfo/XS/parsetexi/counter.c (counter_reset), tp/Texinfo/XS/parsetexi/def.c (split_delimiters, split_def_args), tp/Texinfo/XS/parsetexi/indices.c (complete_indices), tp/Texinfo/XS/parsetexi/macro.c (handle_macro), tp/Texinfo/XS/parsetexi/parser.c (parse_texi): modify code to avoid uninitialized variable compiler warning. * tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info): add missing break. * tp/Texinfo/XS/main/manipulate_tree.c (copy_container_contents): fix new_command_element call order. * tp/Texinfo/XS/parsetexi/def.c (DEF_MAP, parse_def, def*_types): fix type, it is enum element_type. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init), tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/converter.c (new_converter), tp/Texinfo/XS/main/converter_types.h (enum ids_data_type, CONVERTER): make the choice between perl_hashmap and string_list for html ids storage and retrieval a runtime choice. Add ids_data_type field in CONVERTER to register and retrieve the choice. Add a flags argument to new_converter to pass low level implementation configuration, such as the ids data use. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/teximakehtml.c (main): do not add errors_nr to the previous value. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES), tp/Texinfo/XS/main/utils.c, tp/Texinfo/XS/main/customization_options.c: move functions related to customization options out ot utils.c to the new to main/customization_options.c file. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_free_converter), tp/Texinfo/XS/convert/converter.c (free_generic_converter): move debug message if error messages not empty to free_generic_converter. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (destroy, reset_converter): use C converter self->format to determine which function to call. * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_defaults): ignore the arguments. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (find_format_data_index), tp/Texinfo/XS/convert/converter.h (CONVERTER_FORMAT_DATA), tp/Texinfo/XS/main/converter_types.h (enum converter_format) (CONVERTER): move enum converter_format to converter_types.h, add an enum converter_format format field to CONVERTER. Rename CONVERTER_FORMAT_DATA output_format as default_format. * tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init), tp/Texinfo/XS/convert/converter.c (new_converter), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv, converter_get_info_from_sv), tp/Texinfo/XS/convert/texinfo.c (txi_converter) (txi_converter_initialize), tp/Texinfo/XS/teximakehtml.c (main): pass an enum converter_format to new_converter to set the CONVERTER converter_format early. Determine the converter_format in ConvertXS.xs and not in converter_get_info_from_sv. Have converter_get_info_from_sv return its status. Get class from converter_format_data in get_converter_info_from_sv if possible. Add enum converter_format argument to txi_converter. Remove txi_converter_initialize format argument, add output_format and converted_format arguments. If they are not set, take the default from format_defaults based on converter->format. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_converter) (txi_converter_initialize), tp/Texinfo/XS/teximakehtml.c (main): rename txi_converter as txi_converter_initialize and readd txi_converter that just creates a converter and returns it, hiding the converter descriptor. * tp/Texinfo/XS/convert/texinfo.c (txi_parse_texi_file) (txi_remove_document): add wrappers hiding the document descriptor. * tp/Texinfo/XS/teximakehtml.c (main): use txi_parse_texi_file and txi_remove_document. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/teximakehtml.c (add_new_option_strlist_value): copy strings. * tp/Texinfo/XS/teximakehtml.c (main): free parser_options. * tp/Texinfo/XS/convert/texinfo.c (txi_handle_parser_error_messages) (txi_handle_document_error_messages) (txi_handle_converter_error_messages): add wrappers for handle_error_messages to be used directly on document and converter. * tp/Texinfo/XS/teximakehtml.c (main): call txi_handle_*error_messages and exit 1 if there were errors. Remove print_errors. 2024-08-11 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (add_formatted_error_messages), tp/Texinfo/XS/main/document_types.h (ERROR_MESSAGE_LIST), tp/Texinfo/XS/main/errors.c (message_list_line_formatted_message) (message_list_document_formatted_message): add error_nrs field in ERROR_MESSAGE_LIST and set it. Use it in add_formatted_error_messages. * tp/Texinfo/XS/main/errors.c (error_message_text) (handle_error_messages): add handle_error_messages that adds file information to error messages and output them. 2024-08-11 Patrice Dumas * tp/t/test_parser_registrar.t: use is instead of ok when relevant. 2024-08-10 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: remove generation of unused get_options_key_sv_option and build_sv_option_key functions. 2024-08-10 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c: add some comments. 2024-08-10 Patrice Dumas * tp/Texinfo/XS/main/utils.c (add_new_option_value): function to add an option with values based on a list, without trying to find the index in sorted options, for cases where options are found with their names, in practice for parser options. * tp/Texinfo/XS/convert/texinfo.c (txi_parser): pass an OPTIONS_LIST and set parser options based on that list contents. * tp/Texinfo/XS/teximakehtml.c (add_new_option_strlist_value) (parser_EXPANDED_FORMATS, main): set parser options. 2024-08-10 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_parser), tp/Texinfo/XS/teximakehtml.c (values, main): add a VALUE_LIST argument to txi_parser. 2024-10-04 Patrice Dumas Add tp/Texinfo/Commands.pm tp/Texinfo/Options.pm generated files 2024-10-04 Patrice Dumas Add generated code files to version control 2024-10-04 Patrice Dumas * tp/maintain/setup_converters_code_tables.pl: use the basename to name the script generating the code files such that the file content is the same in in and out of source builds. 2024-10-04 Patrice Dumas Update po files 2024-08-10 Patrice Dumas * tp/Texinfo/XS/convert/texinfo.c (txi_converter), tp/Texinfo/XS/teximakehtml.c (main): create converter before txi_converter such that it may be used to get sorted options. * tp/Texinfo/XS/main/utils.c (options_list_add_option): rename list_add_option as options_list_add_option. * tp/Texinfo/XS/teximakehtml.c (main, add_button_option): demonstrate passing button and other options to txi_converter. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/convert/create_buttons.c (new_directions_list_buttons_specifications): add const. 2024-09-13 Patrice Dumas * tp/Texinfo/XS/convert/create_buttons.c (new_special_unit_direction_button): pass direction information as an enum BUTTON_special_unit_directions. Use buttons_special_units_names to get the button name. Pass converter and call html_get_direction_index in new_special_unit_direction_button. Update callers. Move new_directions_list_buttons_specifications to the end of the file. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/convert/create_buttons.h (enum BUTTON_special_unit_directions), tp/Texinfo/XS/convert/html_converter_init_options.h: move enum BUTTON_special_unit_directions to create_buttons.h. 2024-08-10 Patrice Dumas * tp/Texinfo/XS/convert/create_buttons.c (new_button_specification) (new_button_specification_list, new_base_navigation_buttons) (new_base_links_buttons, new_base_navigation_section_buttons) (new_base_navigation_section_footer_buttons), tp/Texinfo/XS/convert/html_converter_init_options.c, tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES): put buttons creations functions in a separate file, create_buttons.c. Rename some functions. 2024-10-04 Patrice Dumas * tp/Texinfo/XS/main/get_perl_info.c (html_fill_button_sv_specification_list): cast to (SV *) before callling SvPVutf8_nolen. Report from Gavin. Analysis of Andreas Schwab: before v5.37.2 SvPVutf8_nolen was a macro that dereferenced its argument, after that the implementation moved into an inline function. 2024-08-10 Patrice Dumas * tp/Texinfo/XS/main/utils.c (list_add_option) (add_option_string_value, add_option_copy, copy_options_list): add a copy function for options lists. * tp/Texinfo/XS/convert/texinfo.c (txi_converter), tp/Texinfo/XS/teximakehtml.c (main): pass options to txi_converter and copy them to conf. 2024-10-03 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_setup_output): rename set_conf as option_set_conf. 2024-08-09 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl, tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/converter.c, tp/Texinfo/XS/convert/html_converter_init_options.c, tp/Texinfo/XS/main/utils.c (option_set_conf_internal, option_set_conf) (option_force_conf): move set_conf and force_conf to utils.c, rename as option_set_conf and option_force_conf. * tp/Texinfo/XS/convert/texinfo.c (txi_converter), tp/Texinfo/XS/main/utils.c (new_option_string_value) (add_option_string_value): rename initialize_option_value as new_option_string_value and add_option_value as add_option_string_value and move to utils.c. * tp/Texinfo/XS/convert/get_converter_perl_info.c (new_option_from_sv) (get_converter_info_from_sv), tp/Texinfo/XS/convert/html_converter_init_options.c (html_converter_defaults), tp/Texinfo/XS/convert/texinfo.c (txi_converter), tp/Texinfo/XS/main/utils.c (copy_options_list_options, new_option, new_option_string_value) (add_option_string_value, free_options_list), tp/Texinfo/XS/main/option_types.h (OPTIONS_LIST): add space field in OPTIONS_LIST and make the list a list on pointers, to have the possibility to change the list size dynamically and have options references remain valid upon reallocation of the list. Update callers, in particular get_converter_info_from_sv and rename get_option_from_sv as new_option_from_sv. 2024-08-09 Patrice Dumas * convert/converter.c (free_generic_converter): call destroy_text_options only if convert_text_options were set. 2024-08-09 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/texinfo.c: rename txi_converter_api.c as texinfo.c. * tp/Texinfo/XS/convert/texinfo.c (txi_complete_document): return void. 2024-08-09 Patrice Dumas * tp/Texinfo/XS/main/translations.c: add const. * tp/Texinfo/XS/teximakehtml.c (main, print_errors): move clear_error_message_list call to print_errors. * tp/Texinfo/XS/convert/txi_converter_api.c (txi_setup), tp/Texinfo/XS/teximakehtml.c (main): rename setup_html_format_parser as txi_setup and call configure_output_strings_translations in txi_setup. * tp/Texinfo/XS/convert/txi_converter_api.c (txi_parser), tp/Texinfo/XS/teximakehtml.c (main): rename parse_texi_file_for_format as txi_parser and do not call parse_file in txi_parser. * tp/Texinfo/XS/convert/txi_converter_api.c (txi_complete_document) (txi_converter), tp/Texinfo/XS/teximakehtml.c (main): rename complete_document as txi_complete_document and converter_for_format as txi_converter. * tp/Texinfo/XS/convert/txi_converter_api.c (txi_html_output), tp/Texinfo/XS/teximakehtml.c (main): implement HTML output as a function, based on teximakehtml.c and ConvertXS.xs code. * tp/Texinfo/XS/teximakehtml.c (main): call remove_document_descriptor in the end. 2024-08-08 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (find_format_data_index): add to find the enum converter_format of a format string. * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/txi_converter_api.c (setup_html_format_parser) (parse_texi_file_for_format, complete_document, converter_for_format), tp/Texinfo/XS/teximakehtml.c: add txi_converter_api.c implementing a high level API for Texinfo parsing, structure and transformations and converter initialization. Move add_option_value and initialize_option_value to txi_converter_api.c. * tp/Texinfo/XS/teximakehtml.c (main): call setup_html_format_parser, parse_texi_file_for_format, complete_document and converter_for_format. * tp/Texinfo/XS/main/manipulate_indices.c (get_sort_key): initialize the string passed to strxfrm_l. * tp/Texinfo/XS/convert/convert_html.c (html_free_converter): do not free customized_type_dir_strings if not set. * tp/Texinfo/XS/convert/convert_html.c (format_raw_cmd) (html_format_setup, html_converter_customize): setup a list of format raw commands in html_format_setup. In html_converter_customize, set the conversion of format raw commands to ignore if the command is not expanded and the status is FRS_status_internal. * tp/Texinfo/XS/convert/convert_html.c (clear_type_explanations) (html_reset_converter, html_free_converter): add clear_type_explanations separated from html_reset_converter code. Call in html_free_converter too, in case html_reset_converter is never called. * tp/Texinfo/XS/convert/convert_html.c (html_free_converter): call reset_translated_special_unit_info_tree in case html_reset_converter is never called. * tp/Texinfo/XS/teximakehtml.c (main): print converter errors. Call html_free_converter. Reorder code. 2024-10-03 Patrice Dumas * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources) (XS_libtexinfo_sources, libtexinfo_la_SOURCES) (C_libtexinfo_convert_sources, XS_libtexinfo_convert_sources) (libtexinfo_convert_la_SOURCES): separate libtexinfo_la_SOURCES and libtexinfo_convert_la_SOURCES in C and XS code using variables. * tp/Texinfo/XS/Makefile.am (teximakehtml_SOURCES) (teximakehtml_LDADD): list libtexinfo and libtexinfo_convert C code files using the variables instead of lining against the libraries. 2024-08-07 Patrice Dumas Add a C demonstration program that converts Texinfo to HTML * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES) (libtexinfo_convert_la_SOURCES, libtexinfo_convert_la_CPPFLAGS) (ConvertXS_la_SOURCES): move structuring_transfo/transformations.c to libtexinfo and convert_html.c to libtexinfo-convert. Remove StructuringTransfoXS_la_SOURCES. * main/replace_perl_api_call.c, convert/replace_perl_call_html_function.c: add functions to replace Perl functions call API of main/call_perl_function.h, main/api_to_perl.h and convert/call_html_perl_function.h by functions that do not need Perl. The C implementations are noops, that are not meant to be called, C code equivalent to the Perl code, which can be called. * tp/Texinfo/XS/convert/convert_html.c (set_root_commands_targets_node_files): initialize called to 0. * tp/Texinfo/XS/convert/convert_html.c (convert_output_unit): use output_unit_conversion_function to get the final status of conversion of output units, as should be. * tp/Texinfo/XS/convert/convert_html.c (html_converter_customize): initialize converter special_unit_body_formatting to 0. * tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state) (register_special_unit_body_formatting_function) (html_converter_customize): allow customized_type_dir_strings, special_unit_body and html_customized_style_commands to be unset if there is no Perl customization. * tp/Texinfo/XS/convert/convert_html.c (ignored_types) (html_converter_customize): set FRS_status_ignored for ignored types. * tp/Texinfo/XS/convert/convert_html.c (html_converter_customize): if FORMAT_MENU is not menu, set conversion status to FRS_status_ignored for menu and detailmenu if they are converted in C. * tp/Texinfo/XS/convert/convert_html.c (html_translate_string) (format_*, html_converter_customize): set conversion functions to C functions if there was no information obtained from Perl, with status remaining FRS_status_none. * tp/Texinfo/XS/Makefile.am (noinst_PROGRAMS, teximakehtml_SOURCES) (teximakehtml_CPPFLAGS, teximakehtml_LDFLAGS, teximakehtml_LDADD), tp/Texinfo/XS/teximakehtml.c: add the teximakehtml program demonstrating the use of the parser, structuring and HTML conversion C code to parser and convert Texinfo to HTML. No customization at all, the intent is to use the program as a demonstrator of how the C code could be used separately from Perl. 2024-10-03 Patrice Dumas * NEWS, tp/Texinfo/Convert/Plaintext.pm (_convert_def_line): use a --- for definition line leading hyphen to end up with two hyphen in the default case as was the case previously. See https://lists.gnu.org/archive/html/bug-texinfo/2004-02/msg00021.html 2024-08-07 Patrice Dumas * tp/Texinfo/XS/main/document.c (initialize_document_options): add C function to initialize and set document options novalidate, documentlanguage based on parser information and call set_output_encoding, as is done in Perl. 2024-08-07 Patrice Dumas * tp/Texinfo/XS/main/builtin_commands.c (ref_3_args_order) (ref_5_args_order), tp/Texinfo/XS/main/builtin_commands.h, tp/Texinfo/XS/main/node_name_normalization.c, tp/Texinfo/XS/structuring_transfo/transformations.c: move definitions of ref_3_args_order and ref_5_args_order to builtin_commands.c such that they are defined in one file only. 2024-10-03 Patrice Dumas * tp/Texinfo/XS/main/get_perl_info.h: remove html_fill_button_specification_list declaration. 2024-08-07 Patrice Dumas * tp/Texinfo/XS/convert/call_html_perl_function.c (init_registered_ids_hv, is_hv_registered_id, hv_register_id) (clear_registered_ids_hv, free_registered_ids_hv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): remove rid union in converter, to be able to have both a string list or Perl HV for registered_ids types. * tp/Texinfo/XS/main/converter_types.h, tp/Texinfo/XS/main/document_types.h (enum command_location): move enum command_location declaration to document_types.h. 2024-08-07 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (setup_converter_paths_information): allow pkgdatadir to be unset. 2024-10-03 Patrice Dumas * tp/Texinfo/XS/main/get_perl_info.h: declare html_fill_sv_options and html_fill_button_sv_specification_list. 2024-08-07 Patrice Dumas * tp/Texinfo/XS/main/utils.c (initialize_options_list), tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv): add. Use in get_converter_info_from_sv. * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/main/utils.c (html_fill_button_directions_specification_list), tp/Texinfo/XS/main/get_perl_info.c (html_fill_button_sv_specification_list), tp/maintain/regenerate_C_options_info.pl: rename html_fill_options as html_fill_sv_options. Split html_fill_button_specification_list in two, with html_fill_button_sv_specification_list for direction filled with information from Perl data, and html_fill_button_directions_specification_list for directions filled from strings set in buttons generated in C. Generate automatically html_fill_options_directions to call html_fill_button_directions_specification_list. Call both html_fill_sv_options and html_fill_options_directions in ConvertXS.xs html_converter_initialize_sv. 2024-08-06 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_free_converter), tp/Texinfo/XS/main/api_to_perl.c, tp/Texinfo/XS/main/document.c (remove_document_descriptor), tp/Texinfo/XS/main/tree.c (destroy_element): inline unregister_perl_tree_element, unregister_document_hv and unregister_perl_tree_element calling unregister_perl_data. 2024-08-05 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_customize), tp/Texinfo/XS/convert/convert_html.c (html_converter_customize): rename html_converter_initialize as html_converter_customize. * tp/Texinfo/XS/convert/converter.c (converter_format_data) (set_converter_init_information), tp/Texinfo/XS/convert/converter.h (CONVERTER_FORMAT_DATA): add a converter_initialize function reference field in CONVERTER_FORMAT_DATA and call it in set_converter_init_information. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/converter.c (converter_format_data), tp/Texinfo/XS/convert/html_converter_init_options.c (html_converter_initialize): add html_converter_initialize with code in Perl converter_initialize function that does not need customization information from Perl. set html_converter_initialize in converter_format_data. Separate code in Perl converter_initialize that is already called in html_converter_initialize and put it in a conditional at the beginning of the function. 2024-08-05 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES): rename convert/converter_options.c as convert/html_converter_init_options.c. 2024-08-05 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (converter), tp/Texinfo/Convert/*.pm (converter_defaults): have converter_defaults return a reference on a hash instead of a hash. 2024-08-05 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (%XS_overrides, set_document), tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_document): call call_common_set_output_perl_encoding in converter_set_document and override the whole set_document Perl function. * tp/Texinfo/XS/convert/ConvertXS.xs (html_conversion_initialization): call html_initialize_output_state without directly. 2024-08-05 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs: reorder XS functions. 2024-08-05 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c: reorder functions. 2024-08-05 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (store_document_texinfo_tree): rename store_texinfo_tree as store_document_texinfo_tree. * tp/Texinfo/XS/convert/ConvertXS.xs (get_conf), tp/Texinfo/XS/main/DocumentXS.xs (document_get_conf), tp/Texinfo/XS/main/build_perl_info.c (build_sv_option_from_name) (latex_build_options_for_convert_to_latex_math): rename get_sv_conf as build_sv_option_from_name and separate converter and sorted options arguments. Use in document_get_conf. * tp/Texinfo/XS/main/build_perl_info.c: add static keyword. * tp/Texinfo/XS/convert/converter_options.h, tp/Texinfo/XS/main/build_perl_info.h: remove unneeded functions declarations, reorder. Remove const, as buttons are modified when Perl data is built when needed. 2024-08-05 Patrice Dumas * tp/Texinfo/XS/convert/converter_options.c (new_special_unit_direction_button, new_basic_buttons) (new_link_buttons, new_directions_list_buttons_specifications): set direction_string only if the direction index is not known. In the current implementation it is always the case, but if the special unit direction names could not be customized their indices could be known early. 2024-10-03 Patrice Dumas * tp/Texinfo/XS/convert/converter_options.c (DEFAULT_MISC_BUTTONS): rename T2H_MISC_BUTTONS as DEFAULT_MISC_BUTTONS. * tp/Texinfo/XS/convert/converter_options.c (set_html_default_buttons_specifications): set default MISC_BUTTONS matching Perl using new_directions_list_buttons_specifications. 2024-10-03 Patrice Dumas * tp/Texinfo/XS/convert/converter_options.c (buttons_special_units_names), tp/Texinfo/XS/convert/converter_options.h (enum BUTTON_special_unit_directions): rename t2h_special_units_names as buttons_special_units_names and enum T2H_special_unit_directions as enum BUTTON_special_unit_directions. 2024-10-03 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.h: declare html_build_buttons_specification. * tp/Texinfo/XS/convert/converter_options.c (new_directions_list_buttons_specifications): rename new_texi2html_buttons_specifications as new_directions_list_buttons_specifications. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (get_conf): rename conf argument as option_name. * tp/Texinfo/XS/main/get_perl_info.c (html_button_function_type_string): rename button_function_type_string as html_button_function_type_string and make it extern. * tp/Texinfo/XS/convert/converter_options.c (new_button_specification) (new_basic_buttons, new_link_buttons), tp/Texinfo/XS/main/get_perl_info.c (html_fill_button_specification_list), tp/Texinfo/XS/main/option_types.h (BUTTON_SPECIFICATION): add direction_string to BUTTON_SPECIFICATION for pure C buttons to hold a directions string if the direction index is not already known when the button specification is setup, for special units direction whose names are not known early. In html_fill_button_specification_list, use the direction_string is there is no Perl data and the direction index is negative. Add an argument to new_button_specification and set it in new_basic_buttons and new_link_buttons for Contents and About. * tp/Texinfo/XS/main/build_perl_info.c (html_build_button): add to build a Perl button specification from a 'pure' C button structure BUTTON_SPECIFICATION. This is a partial implementation for BST_direction and BST_direction_info + BIT_function. This function can only be called for default buttons for now, so we do not need to handle other types of buttons. * tp/Texinfo/XS/main/build_perl_info.c (html_build_buttons_specification): add to build a Perl buttons specifications list from a 'pure' C BUTTON_SPECIFICATION_LIST. * tp/Texinfo/XS/main/build_perl_info.c (build_sv_option), tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_navigation_panel) (call_formatting_function_format_navigation_header): call html_build_buttons_specification if there is no Perl data for a buttons specification list. * tp/Texinfo/XS/convert/converter_options.c (new_basic_buttons): add an argument to add an about button only if set. Update callers to set only for headers buttons specifications. * tp/Texinfo/XS/convert/converter_options.c (set_option_buttons_specification) (set_html_default_buttons_specifications): add set_html_default_buttons_specifications to set buttons customization options with texi2any default buttons. * tp/Texinfo/XS/convert/converter_options.c (t2h_special_units_names) (enum T2H_special_unit_directions, T2H_SECTION_BUTTONS, T2H_TOP_BUTTONS) (T2H_MISC_BUTTONS, T2H_CHAPTER_BUTTONS, T2H_SECTION_FOOTER_BUTTONS) (new_texi2html_buttons_specifications): function and data to setup buttons in the texi2html way. * tp/Texinfo/XS/convert/converter_options.c (set_texi2html_default_buttons_specifications): add to set buttons customization options with texi2html buttons. * tp/Texinfo/XS/convert/converter.h (CONVERTER_FORMAT_DATA), tp/Texinfo/XS/convert/converter.c (set_converter_init_information): add converter_defaults function pointer to CONVERTER_FORMAT_DATA to call to initialize a converter for a specific format. Get it and call it in set_converter_init_information, with the user configuration information structure as argument. * tp/Texinfo/XS/convert/converter.c (converter_format_data), tp/Texinfo/XS/convert/converter_options.c (html_converter_defaults): add a converter_defaults function for HTML converter format that sets customization options using converters_defaults.c function and buttons, both for default and with TEXI2HTML set. * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_defaults): return undef, all the HTML customization default setup is done in C now. 2024-10-03 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfoxs*): readd mistakenly removed libtexinfoxs in conflicts resolution on 2024-10-02 "remove block of definition of libtexinfo_convert that crept in". * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES): really add converter_options.c. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES), tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/converter_options.c (new_button_specification) (new_button_specification_list, new_basic_buttons, new_link_buttons) (new_section_buttons, new_section_footer_buttons), tp/Texinfo/XS/convert/converter_options.h: add a new file converter_options.c for converters initialization code needed for converters other than generic converter code. Move buttons creation in C functions from convert_html.c to converter_options.c. 2024-10-02 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES): remove files that are in libtexinfo_convert_la_SOURCES. * tp/Texinfo/XS/Makefile.am: remove block of definition of libtexinfo_convert that crept in through rebasing and incorrect conflicts resolution. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (set_translated_commands): remove converter, use directly generated translated commands. * tp/Texinfo/XS/convert/get_converter_perl_info.c: remove get_sv_configured_options. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (CONVERTER_FORMAT_DATA) (converter_format_data): rename CONVERSION_FORMAT_DATA as CONVERTER_FORMAT_DATA, conversion_format as converter_format_data, enum conversion_output_format as enum converter_format and CONVERSION_FORMAT_NR as TXI_CONVERSION_FORMAT_NR. * tp/Texinfo/XS/convert/converter.h (enum converter_format) (TXI_CONVERSION_FORMAT_NR, CONVERTER_FORMAT_DATA), tp/Texinfo/XS/convert/converter.c: move declarations to converter.h. * tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init), tp/Texinfo/XS/convert/converter.c (set_converter_init_information), tp/Texinfo/XS/main/get_perl_info.c (converter_get_info_from_sv): determine enum converter format in converter_get_info_from_sv, pass it as return value. Pass status in an integer reference. * tp/Texinfo/XS/convert/converter.c (set_global_document_commands): allow converter document to be NULL. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES) (ConvertXS_la_SOURCES): put generic converter source files in libtexinfo_la_SOURCES instead of ConvertXS_la_SOURCES as all the code that link against libtexinfoxs requires it through get_perl_info.c. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/main/utils.c (get_global_document_command): set command_list for multi commands in the if multi. 2024-08-04 Patrice Dumas * tp/maintain/regenerate_perl_options_info.pl: use more simple quotes. set a hash for conversion options and use it to retrieve the information in generated get_converter_regular_options. 2024-08-04 Patrice Dumas * doc/texi2any_api.texi (Managing Customization Variables): put the 'Adding Customization Variables' node in an ignore block. Indeed, adding customization variables is currently only possible in Perl, not with XS/C, and it is unlikely to change, as to be available in C too it would need to specify a type (integer, byte or char) and add dynamically options, which would involve important changes, so it is not certain that it is worth keeping this possibility, especially since it is not used anwhere in Texinfo currently. 2024-10-02 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_converter_info_from_sv): do not error out on deprecated_config_directories customization hash directory key. 2024-08-04 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (_generic_converter_init): update warning message. * tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init), tp/Texinfo/XS/main/get_perl_info.c (get_converter_info_from_sv) (converter_get_info_from_sv): pass Perl class down to get_converter_info_from_sv. Issue a message for an unknown customization option. 2024-08-04 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (_generic_converter_init), tp/Texinfo/XS/convert/ConvertXS.xs (generic_converter_init): rename _internal_converter_initialize as _generic_converter_init, and XS generic_converter_init as generic_converter_init. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/main/api_to_perl.c (register_perl_data): add register_perl_data and call it or unregister_perl_data, inlining register_perl_buttons_list, unregister_perl_buttons_list, unregister_perl_button, register_perl_button, unregister_perl_direction_icons. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (destroy_converter_initialization_info): rename free_converter_initialization_info as destroy_converter_initialization_info. Free the CONVERTER_INITIALIZATION_INFO argument. * tp/Texinfo/XS/main/document.c (destroy_document_information_except_tree): free sorted_options. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/main/get_perl_info.c (get_converter_info_from_sv) (set_non_customization_sv), tp/Texinfo/XS/convert/converter.c (free_converter_initialization_info, apply_converter_info): rename defaults_info variable as initialization_info, defaults_sv as init_info_sv, defaults as init_info. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs, tp/Texinfo/XS/main/converter_types.h (CONVERTER_INITIALIZATION_INFO), tp/Texinfo/XS/convert/converter.c (apply_converter_info) (set_converter_init_information, new_converter_initialization_info), tp/Texinfo/XS/main/get_perl_info.c (get_converter_info_from_sv) (converter_get_info_from_sv): rename CONVERTER_DEFAULTS_INFO as CONVERTER_INITIALIZATION_INFO. Rename apply_converter_defaults as apply_converter_info, fill_converter_conf as set_converter_init_information, new_converter_defaults_info as new_converter_initialization_info, free_converter_defaults_info as free_converter_initialization_info, get_converter_defaults_from_sv as get_converter_info_from_sv and converter_get_defaults_sv as converter_get_info_from_sv. Update users/callers. 2024-10-02 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c: remove converter_initialize_sv. * tp/Texinfo/XS/convert/get_converter_perl_info.c (set_translated_commands): add converter argument. * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_option_from_sv, set_non_customization_sv) (get_converter_defaults_from_sv, converter_get_defaults_sv), tp/Texinfo/XS/main/get_perl_info.c: move to get_converter_perl_info.c. 2024-08-04 Patrice Dumas * tp/Texinfo/XS/main/api_to_perl.c (register_perl_data), tp/Texinfo/XS/main/utils.c (copy_option): copy icon sv. * tp/Texinfo/XS/main/option_types.h (OPTIONS_LIST), tp/Texinfo/XS/main/utils.c (free_options_list) (copy_options_list_options): add OPTIONS_LIST, and associated functions, free_options_list and copy_options_list_options. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_option): handle options unset. It could happen, for example, if the information gotten is a separate option information not (already) associated to an OPTIONS structure, for example passing through a OPTIONS_LIST. * tp/Texinfo/XS/main/converter_types.h (CONVERTER_DEFAULTS_INFO), tp/Texinfo/XS/convert/converter.c (new_converter_defaults_info) (new_converter_defaults_info), tp/Texinfo/XS/main/get_perl_info.c (get_converter_defaults_from_sv): add CONVERTER_DEFAULTS_INFO, a structure holding information that can be passed as information for converter, with options, format names and translated commands. Add get_converter_defaults_from_sv to set it from Perl data. * tp/Texinfo/XS/main/get_perl_info.c (set_translated_commands): pass a SV and returns a newly allocated TRANSLATED_COMMAND. * tp/Texinfo/XS/main/get_perl_info.c (get_option_from_sv): setup an OPTION based on a SV and an option name. * tp/Texinfo/XS/convert/ConvertXS.xs (converter_initialize), tp/Texinfo/XS/convert/converter.c (apply_converter_defaults) (fill_converter_conf), tp/Texinfo/XS/main/get_perl_info.c (set_non_customization_sv, converter_get_defaults_sv): get information on format defaults and user customization in a separate function, converter_get_defaults_sv. Then set them in the C converter with fill_converter_conf. Remove converter_initialize_sv. 2024-08-03 Patrice Dumas * tp/Texinfo/XS/main/get_perl_info.h: remove get_options_key_sv_option and set_option_key_configured. 2024-08-03 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: rename generated build_sv_option as build_sv_option_key. * tp/Texinfo/XS/main/build_perl_info.c (build_sv_option): add build_sv_option that gets a Perl SV based on an OPTION, for all the types of options. * tp/Texinfo/XS/main/build_perl_info.c (get_sv_conf), tp/Texinfo/XS/main/DocumentXS.xs (document_get_conf): find option using sorted options with a call to find_option_string. Call build_sv_option to get the Perl SV. 2024-08-03 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs, tp/Texinfo/XS/main/get_perl_info.c: remove reset_output_init_conf and copy_converter_conf_sv. * tp/maintain/regenerate_C_options_info.pl: rename generated get_sv_option as get_options_key_sv_option. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_option) (get_sorted_options_key_sv_option): add get_sv_option function that sets an OPTION based on a Perl SV, for all the types of options. Add get_sorted_options_key_sv_option that finds an option using sorted options and then sets it with Perl SV. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_options) (init_copy_sv_options): add a sorted_options argument to get_sv_options and use get_sorted_options_key_sv_option. Change init_copy_sv_options to set sorted options too and optionally get them back. Update callers. * tp/Texinfo/XS/main/DocumentXS.xs (register_document_options), tp/Texinfo/XS/main/document.c (register_document_options), tp/Texinfo/XS/main/document.h (DOCUMENT): add and set sorted_options field in DOCUMENT; * tp/Texinfo/XS/main/utils.c (free_option, initialize_option): always the same order with integer then char. 2024-10-02 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c: remove reset_output_init_conf. * tp/Texinfo/XS/convert/get_converter_perl_info.c (copy_sv_options_for_convert_text): fix init_copy_sv_options calls. * tp/Texinfo/XS/main/get_perl_info.h: declare get_sorted_options_key_sv_option. 2024-08-03 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs, tp/Texinfo/XS/main/get_perl_info.c: remove reset_output_init_conf and copy_converter_conf_sv. * tp/maintain/regenerate_C_options_info.pl: rename generated get_sv_option as get_options_key_sv_option. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_option) (get_sorted_options_key_sv_option): add get_sv_option function that sets an OPTION based on a Perl SV, for all the types of options. Add get_sorted_options_key_sv_option that finds an option using sorted options and then sets it with Perl SV. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_options) (init_copy_sv_options): add a sorted_options argument to get_sv_options and use get_sorted_options_key_sv_option. Change init_copy_sv_options to set sorted options too and optionally get them back. Update callers. * tp/Texinfo/XS/main/DocumentXS.xs (register_document_options), tp/Texinfo/XS/main/document.c (register_document_options), tp/Texinfo/XS/main/document.h (DOCUMENT): add and set sorted_options field in DOCUMENT; * tp/Texinfo/XS/main/utils.c (free_option, initialize_option): always the same order with integer then char. 2024-10-02 Patrice Dumas * doc/texinfo.texi (HTML Xref Configuration): Add text explaining necessity of htmlxref.cnf. Mention possibility of local htmlxref.cnf. 2024-10-02 Gavin Smith * NEWS: remove items that were in 7.1.1 2024-10-02 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_sv_configured_options, converter_initialize_sv), tp/Texinfo/XS/main/get_perl_info.c: move get_sv_configured_options and converter_initialize_sv to get_converter_perl_info.c. Remove obsolete converter_initialize from get_converter_perl_info.c. 2024-08-03 Patrice Dumas * tp/Texinfo/XS/main/utils.c (find_option_string): return 0 if not found. * tp/Texinfo/XS/main/utils.c (set_sorted_option_key_configured): set configured on an OPTION found by name using find_option_string. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_configured_options) (converter_initialize_sv): use set_sorted_option_key_configured. 2024-08-03 Patrice Dumas * tp/Texinfo/XS/main/utils.c (compare_option_str, initialize_option), tp/maintain/regenerate_C_options_info.pl: add option name in initialize_option and in generated initialize_options. * tp/maintain/regenerate_C_options_info.pl: generate TXI_OPTIONS_NR. Generate setup_sortable_options that sets up an array of OPTIONS OPTION fields. * p/Texinfo/XS/convert/converter.c (init_generic_converter) (free_generic_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/main/utils.c (setup_sorted_options), tp/Texinfo/XS/main/option_types.h (OPTION): setup sorted_options field in converter with the sorted options of conf. * tp/Texinfo/XS/main/utils.c (find_option_string): add a function to use bsearch to find an option by name in a sorted options array. 2024-08-03 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (enum conversion_output_format) (CONVERSION_FORMAT_NR, CONVERSION_FORMAT_DATA, conversion_format): setup preliminary data table to describe a converted format to be able to associate strings and functions. 2024-08-03 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (init), tp/Texinfo/XS/convert/converter.c (converter_setup): add directories as converter_setup arguments. Call setup_converter_paths_information and set_element_type_name_info in converter_setup, not in ConvertXS.xs init. 2024-08-03 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (%common_converters_defaults), tp/Texinfo/Convert/HTML.pm (_load_htmlxref_files), tp/texi2any.pl: rename language_config_dirs as texinfo_language_config_dirs. 2024-08-02 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (reset_output_init_conf), tp/Texinfo/XS/main/get_perl_info.c: move reset_output_init_conf to get_converter_perl_info.c. 2024-08-02 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (get_sv_conf): rename get_conf as get_sv_conf. Update callers. * tp/Texinfo/XS/main/build_perl_info.c (build_translated_commands): add. * tp/Texinfo/XS/convert/converter.h (default_special_unit_varieties), tp/Texinfo/XS/convert/convert_html.h: move default_special_unit_varieties declaration to converter.h. * tp/Texinfo/XS/convert/converter.c (destroy_translated_commands), tp/Texinfo/XS/main/convert_utils.c: move destroy_translated_commands to converter.c. * tp/maintain/regenerate_C_options_info.pl: generate C functions to set converter generic options. * tp/Texinfo/Convert/Converter.pm (set_conf), tp/Texinfo/XS/convert/ConvertXS.xs (set_conf, force_conf), tp/Texinfo/XS/main/get_perl_info.c (set_sv_conf), tp/maintain/regenerate_C_options_info.pl: add return values to the get_sv_option generate function to determine if setting a customization variable failed and why. Add a status return value to set_sv_conf and to the set_conf and force_conf XS overrides. Take into account _XS_set_conf return value to determine if the customization option was set. * tp/Texinfo/XS/main/api_to_perl.c (get_refcount): add an unused function, for debugging. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_options): call get_sv_option even for options with undef values. * tp/Texinfo/XS/main/get_perl_info.c (set_translated_commands): free previous translated_commands before getting new ones. * tp/Texinfo/XS/main/api_to_perl.c (unregister_perl_buttons_list) (register_perl_buttons_list, unregister_perl_direction_icons), tp/Texinfo/XS/main/get_perl_info.c (html_fill_button_specification_list) (html_get_button_specification_list, html_fill_direction_icons) (html_get_direction_icons_sv), tp/Texinfo/XS/main/utils.c (html_free_button_specification_list, html_free_direction_icons) (copy_option), tp/maintain/regenerate_C_options_info.pl: add icons SV to the direction icons lists. Add html_fill_button_specification_list and html_fill_direction_icons to fill the directions information in buttons or icons based on the Perl references. Own all the Perl objects in C by increasing refcount when registering and decreasing refcount when destroying the object they are registered into. Generate html_fill_options function in regenerate_C_options_info.pl that calls html_fill_button_specification_list and html_fill_direction_icons for all the relevant options. * tp/Texinfo/XS/main/get_perl_info.c (converter_initialize_sv): rename converter_initialize as converter_initialize_sv. * tp/Texinfo/Convert/Converter.pm (_internal_converter_initialize) (converter), tp/Texinfo/XS/main/build_perl_info.c (pass_generic_converter_to_converter_sv), tp/Texinfo/XS/convert/ConvertXS.xs (converter_initialize) (html_converter_initialize_sv), tp/Texinfo/XS/convert/converter.c (init_generic_converter, new_converter), tp/Texinfo/XS/main/build_perl_info.c (pass_generic_converter_to_converter_sv), tp/Texinfo/XS/main/get_perl_info.c (converter_initialize_sv): initialize default generic data and customizations options of generic converter in C, in the new init_generic_converter function. Setup explicitely %format_defaults in Perl converter and pass to XS, together with the customization options hash. Move converter() Perl code now initialized in C to _internal_converter_initialize. Add pass_generic_converter_to_converter_sv to pass information from C to the Perl converter, based on ConvertXS.xs converter_initialize code, expanded to pass translated_commands and initialize output_files. Setup Perl customization variables, translated_commands and output_format in XS/C in converter_initialize_sv. Do not set C customization data based on Perl data anymore. Call html_fill_options in html_converter_initialize_sv. * tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/convert/converter.c (free_generic_converter), tp/Texinfo/XS/main/get_perl_info.c (converter_initialize_sv): add converted_format field to converter and set it. 2024-08-02 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (html_attribute_class, _convert_text), tp/Texinfo/Convert/Plaintext.pm (new_formatter): always access configuration through get_conf() in case it is in C data only. * tp/Texinfo/XS/convert/convert_html.c: change in comments. 2024-08-01 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: protect " in generated C strings. * tp/Texinfo/Convert/HTML.pm (_set_variables_texi2html), tp/Texinfo/Convert/converters_defaults.txt (texi2html): add texi2html regular options to Texinfo/Convert/converters_defaults.txt. 2024-08-01 Patrice Dumas * tp/Texinfo/Convert/Utils.pm (output_files_initialize) (output_files_disable_output_encoding, output_files_open_out) (output_files_register_closed, output_files_opened_files) (output_files_unclosed_files), tp/Texinfo/Common.pm: move output files open/close API from Common.pm to Convert/Utils.pm. * tp/Texinfo/Convert/Converter.pm (_internal_converter_initialize): initialize error_warning_messages in _internal_converter_initialize. 2024-08-01 Patrice Dumas * tp/Texinfo/XS/main/utils.c (html_get_direction_index), tp/Texinfo/XS/convert/converter.c: move html_get_direction_index from converter.c to utils.c. 2024-10-02 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: use basename of generating program in comments. Add TODO item from Bruno CI. 2024-08-01 Patrice Dumas * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/converters_defaults.txt: add converter and common 'formats' options to use in Texinfo/Convert/Converter.pm. 2024-08-01 Patrice Dumas * tp/maintain/regenerate_C_options_info.pl: fix parsing of converter defaults options with space. * tp/Makefile.am (Texinfo/Options.pm), tp/Texinfo/XS/Makefile.am (Options.pm), tp/maintain/regenerate_perl_options_info.pl: generate Perl data based on Texinfo/Convert/converters_defaults.txt. * tp/Texinfo/Convert/HTML.pm (%defaults): get options set from Texinfo/Convert/converters_defaults.txt. 2024-07-31 Patrice Dumas * tp/Makefile.am (EXTRA_DIST), tp/Texinfo/Convert/converters_defaults.txt, tp/Texinfo/XS/Makefile.am (BUILT_SOURCES, MAINTAINERCLEANFILES, regenerate_C_options_info.pl) (ConvertXS_la_SOURCES, EXTRA_DIST), tp/maintain/regenerate_C_options_info.pl: generate with regenerate_C_options_info.pl C functions in convert/converters_defaults.c based on a textual description in tp/Texinfo/Convert/converters_defaults.txt that sets converters default string and integer options. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_default_format_button): fix handling of BST_string, BST_external_string, BIT_string and BIT_external_string based on their new significations. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (html_get_direction_index), tp/Texinfo/XS/main/get_perl_info.c: move html_get_direction_index from get_perl_info.c to converter.c. * tp/Texinfo/XS/main/tree_types.h (enum html_text_type), tp/Texinfo/XS/main/converter_types.h: move enum html_text_type from converter_types.h to tree_types.h. * tp/Texinfo/XS/main/option_types.h (BUTTON_SPECIFICATION_INFO): use enum html_text_type for direction_information_type type instead of int. * tp/Texinfo/XS/main/get_perl_info.c (html_get_button_specification_list), tp/Texinfo/XS/main/option_types.h (enum button_specification_type) (enum button_information_type, BUTTON_SPECIFICATION_INFO) (BUTTON_SPECIFICATION), tp/Texinfo/XS/main/utils.c (html_free_button_specification_list, copy_option): rename BST_string as BST_external_string and BIT_string as BIT_external_string. Readd BST_string and BIT_string associated to a regular char *string. * tp/Texinfo/XS/convert/convert_html.c (new_button_specification) (new_button_specification_list, new_basic_buttons, new_link_buttons) (new_section_buttons, new_section_footer_buttons): add button specification, button list and default button specification lists creation functions. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize): move default setting before customization up. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize): free pre_class_types before applying customization. Free style_command element before applying customization. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): move call to html_converter_initialize and copy_converter_conf_sv out of get_html_perl_info.c to ConvertXS.xs. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), p/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): pass customized_no_arg_commands_formatting as an argument. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (accent_cmd, html_format_setup) (html_converter_initialize, html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): collect accent commands in accent_cmd in convert_html.c, not in converter. Remove accent_cmd converter field. * tp/Texinfo/XS/convert/convert_html.c (style_formatted_cmd) (html_format_setup, html_converter_initialize, html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): collect style brace commands in style_formatted_cmd in convert_html.c, not in converter. Remove style_formatted_cmd converter field. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (COMMAND_HTML_STYLE_COMMAND_CONVERSION, CONVERTER), tp/Texinfo/XS/convert/convert_html.c (html_free_converter): add html_customized_style_commands field to converter with type COMMAND_HTML_STYLE_COMMAND_CONVERSION. Pass style_commands_customized_formatting_info from Perl to C through html_converter_initialize_sv. * tp/Texinfo/XS/convert/convert_html.c (quoted_style_commands) (default_style_commands_formatting, html_format_setup): add quoted_style_commands. set default_style_commands_formatting based on quoted_style_commands and html_style_commands_element from conversion_data.c. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): set self->html_style_command_conversion based on default_style_commands_formatting and on self->html_customized_style_commands in C. Do not get style_commands_formatting from Perl. 2024-07-31 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize): setup %customized_accent_entities with all the customized commands before filling accent_entities. * tp/Texinfo/XS/convert/converter.c (xml_accent_text_entities), tp/Texinfo/XS/main/converter_types.h (COMMAND_ACCENT_ENTITY_INFO): setup xml_accent_text_entities defaults. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize) (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add html_customized_accent_entity_info field to CONVERTER, with type COMMAND_ACCENT_ENTITY_INFO. Pass customized_accent_entities from Perl to C through html_converter_initialize_sv. Set self->accent_entities in html_converter_initialize based on xml_accent_text_entities, with customized values added. Do not get accent_entities from Perl anymore. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/main/command_data.awk: rename CM_POUND_SIGN as CM_DOUBLE_QUOTE. Add CM_AMPERSAND. 2024-07-31 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/convert_html.c (default_code_types) (default_pre_class_types, html_converter_initialize) (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (TYPE_INTEGER_INFORMATION, PRE_CLASS_TYPE_INFO, CONVERTER): set default_code_types and default_pre_class_types. Add html_customized_code_types field to CONVERTER with type TYPE_INTEGER_INFORMATION and html_customized_pre_class_types field with type PRE_CLASS_TYPE_INFO. Pass customized_type_formatting from Perl to those converter fields. Do not get code_types nor pre_class_types from Perl. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): move up code which should have defaults in C and customization from Perl. No change. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_format_setup): preset unset default_no_arg_commands_formatting for string and preformatted context for no arg commands only. * tp/Texinfo/XS/main/converter_types.h (STYLE_COMMAND_CONTEXT_NR) (NO_ARG_COMMAND_CONTEXT_NR): add STYLE_COMMAND_CONTEXT_NR and NO_ARG_COMMAND_CONTEXT_NR macros. Use them everywhere to replace previously used bounds. STYLE_COMMAND_CONTEXT_NR is set to get only normal and preformatted contexts. 2024-07-31 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (convert_style_command) (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (HTML_STYLE_COMMAND_CONVERSION, CONVERTER): add html_style_command_conversion field to CONVERTER with type HTML_STYLE_COMMAND_CONVERSION for style commands conversion, instead of using the same array as brace no arg commands. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_no_arg_commands_formatting, build_html_translated_names), tp/Texinfo/XS/convert/convert_html.c (default_no_arg_commands_formatting, text_element_conversion) (convert_no_arg_command, css_string_convert_no_arg_command) (html_convert_css_string_for_list_mark) (set_no_arg_commands_formatting) (reset_unset_no_arg_commands_formatting_context) (copy_html_no_arg_command_conversion, html_initialize_output_state) (free_html_no_arg_command_conversion, html_free_converter) (html_translate_names), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv, html_conversion_initialization_sv), tp/Texinfo/XS/main/converter_types.h (HTML_NO_ARG_COMMAND_CONVERSION): (CONVERTER): remove style field from HTML_COMMAND_CONVERSION and rename as HTML_NO_ARG_COMMAND_CONVERSION. Rename html_command_conversion converter field as html_no_arg_command_conversion now that it contains only no args commands. Rename copy_html_command_conversion as copy_html_no_arg_command_conversion, rename free_html_command_conversion as free_html_no_arg_command_conversion. 2024-07-31 Patrice Dumas * tp/Texinfo/Config.pm (texinfo_register_style_command_formatting): correct 'quote'. * tp/Texinfo/Config.pm (GNUT_get_no_arg_command_formatting): use GNUT_no_arg_commands_formatting_strings for context check. * tp/Texinfo/Convert/HTML.pm (%default_style_commands_formatting): rename %style_commands_formatting as %default_style_commands_formatting. * doc/texi2any_api.texi (Simple Output Customization for Simple Commands with Braces), tp/Texinfo/Config.pm (@all_style_commands_formatting_context) (_GNUT_initialize_style_commands_formatting_info), tp/Texinfo/Convert/HTML.pm (@style_commands_contexts) (@no_args_commands_contexts), tp/init/documentation_examples.pm, tp/init/sc_formatting_with_css.pm: do not set string context for style commands. Use variables for the list of contexts. * tp/Texinfo/Convert/HTML.pm (converter_initialize): get all the style commands formatting customization in %style_commands_customized_formatting_info before applying it. 2024-07-30 Patrice Dumas * po_document/Makevars (XGETTEXT_OPTIONS): add pgdt_noop keyword. * po_document/POTFILES.in: add tp/Texinfo/XS/main/conversion_data.c. 2024-07-30 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (determine_non_default_special_unit_directions) (html_initialize_output_state): add a function that returns an array indicating special units directions different from default spacial units directions names. Indeed, if the customized special unit direction name is not the same as the defaults, the default direction info should not be used as they are not for the customized special unit direction. Code taken from html_initialize_output_state for special units direction strings. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize) (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add customized_translated_direction_strings field in converter and get the customized translated_direction_strings in html_converter_initialize_sv in the same code where customized untranslated direction_strings are determined. Set converter translated_direction_strings in html_converter_initialize based on defaults from main/conversion_data.c and customized_translated_direction_strings. Do not set translated_direction_strings from Perl data in html_converter_initialize_sv. 2024-07-30 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): merge conditions on spec_sv for customized_direction_strings. 2024-07-30 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/convert_html.c (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): do not set converter->default_converted_directions_strings anymore from Perl, as the C defaults are now used. Remove the default_converted_directions_strings argument of html_converter_initialize_sv. Remove the default_converted_directions_strings CONVERTER field. 2024-07-30 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize): avoid spurious autovivification for translated_direction_strings. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): handle undef spec hv in translated_direction_strings. * tp/maintain/generate_code_convert_data.pl: declare default_converted_directions_strings and default_translated_directions_strings. * tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state): use default_converted_directions_strings from main/conversion_data.c instead of the information coming from Perl. Determine the special units directions that are not the same as the default units directions. If not the same as the defaults, the default direction info should not be used as they are not for the customized special unit direction. 2024-07-30 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize): remove the code setting sorted_special_unit_varieties and simplified_special_unit_info as they are not used anymore. 2024-07-30 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize): call GNUT_get_direction_string_info only once. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): get customized_direction_strings through the call of html_converter_initialize_sv, not from the Perl converter state. 2024-07-30 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (@all_directions_except_special_units) (converter_initialize, conversion_initialization): do not use default directions strings directions to apply customized direction strings, merge the directions that never change, global relative and file, and the special units directions that may be customized. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): fix code getting context values of customized_direction_strings. * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/init/special_unit_direction_string_info_customization.pm, tp/t/init_files_tests.t (button_replacement_direction_strings_customization): test direction customization and button direction replacement and direction strings customization for the modified special unit direction. 2024-07-30 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/convert_html.c (html_converter_init_special_unit, html_converter_initialize), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_init_special_unit_sv, html_converter_initialize_sv): split html_converter_init_special_unit out of html_converter_initialize and html_converter_init_special_unit_sv out of html_converter_initialize_sv and modify html_converter_initialize_sv in ConvertXS.xs to setup first the the special unit info, as the special unit directions are needed for the remainder of initialization. Therefore special unit Perl customization needs to be read and special unit initialization in C code needs to be run too before doing the remaining. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): do not use the default special unit info, but the customized special units info. * tp/Makefile.tres, tp/t/init_files_tests.t (button_replacement_and_direction_customization): test both special unit direction customization and replacement of button in buttons specifications. 2024-07-30 Patrice Dumas * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/init_files_tests.t (ref_for_special_unit_direction) (button_replacement_for_special_unit_direction), tp/t/init/button_replacement_for_special_unit_direction.pm: add a reference without init file use for special element direction test. Add an init file to replace the button directions with the customized special unit direction. 2024-10-02 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (converter_initialize): readd converter_initialize that was mistakenly removed. 2024-07-30 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (direction_string) (from_element_direction): return 0 if the direction is negative, which should mean a Perl direction not found in C. * tp/Texinfo/XS/main/get_perl_info.c (html_get_direction_index): return -2 if there are directions in the converter and the direction is not found (instead of -1). * tp/Texinfo/XS/main/get_perl_info.c (html_get_button_specification_list): add more checks of empty arrays, undef values. * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/init_files_tests.t ($special_unit_direction_customization_text) (special_unit_direction_customization), tp/t/init/special_unit_direction_customization.pm: add test of special unit direction customization. 2024-07-30 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_default_format_footnotes_sequence): free footnote_location_href. * tp/Texinfo/XS/convert/get_html_perl_info.c (register_formatting_reference_default) (register_formatting_reference_with_default): handle HV set to 0 in argument. * tp/maintain/generate_code_convert_data.pl: add SPECIAL_UNIT_INFO_TYPE_NR and default_special_unit_info declarations. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/convert_html.c (html_add_special_unit_info) (html_converter_initialize, reset_special_unit_info_list) (html_reset_converter, html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (SPECIAL_UNIT_INFO, SPECIAL_UNIT_INFO_LIST, CONVERTER): get customized_special_unit_info in argument of html_converter_initialize_sv, put it in SPECIAL_UNIT_INFO_LIST new type in customized_special_unit_info field of converter. Also get the customized_special_unit_varieties in converter, although this information is not used for now. Set special_unit_varieties based on defaults in conversion_data.c and set special_unit_info default in html_converter_initialize before applying customization. 2024-07-29 Patrice Dumas * tp/maintain/generate_code_convert_data.pl: add BASE_DEFAULT_CSS_ELEMENT_CLASS_STYLE_NR in main/conversion_data.h. * tp/Texinfo/XS/convert/convert_html.c (html_css_set_selector_style) (sort_css_element_class_styles, find_css_selector_style): use a CSS_SELECTOR_STYLE_LIST pointer as first argument. Update callers. * tp/Texinfo/XS/convert/convert_html.c (html_attribute_class) (convert_itemize_command): check that style in selector_style is set. * tp/Texinfo/XS/convert/convert_html.c (get_special_list_mark_css_string_no_arg_command): add based on html_initialize_output_state code. Use in html_initialize_output_state. * tp/Texinfo/XS/convert/convert_html.c (html_format_setup) (default_css_element_class_styles): set default_css_element_class_styles based on base_default_css_element_class_styles set in main/conversion_data.c, add and remove selectors with styles. * tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state): initialize self->css_element_class_styles with default_css_element_class_styles. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): remove default_css_element_class_styles argument. Set default_css_element_class_styles as a variable set to 0 in html_converter_initialize_sv such that the code can be left but is not run. 2024-07-29 Patrice Dumas * tp/Texinfo/XS/Makefile.am (main/conversion_data.c), maintain/generate_code_convert_data.pl: read C commands data on STDIN. Generate default_translated_directions_strings and html_style_commands_element C data. * tp/Makefile.am (Texinfo/Data.pm): reformat. 2024-07-29 Patrice Dumas * tp/Texinfo/Data/default_direction_strings.csv, tp/Texinfo/Data/default_special_unit_info.csv, tp/maintain/generate_code_convert_data.pl: determine translation context automatically. Remove columns from data files. * tp/Makefile.am (maintenance_files, Texinfo/Data.pm), tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES, EXTRA_DIST) (BUILT_SOURCES, main/conversion_data.c, MAINTAINERCLEANFILES), tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/main/converter_types.h, tp/Texinfo/XS/main/option_types.h, tp/Texinfo/XS/main/tree_types.h, tp/maintain/generate_code_convert_data.pl: generate automatically C code files based on tp/Texinfo/Data/*.csv in generate_code_convert_data.pl in parallel with Perl code generation. Replace from manually set enum, arrays and macros special_unit_info_type_names, translated_special_unit_info, direction_type_translation_context, enum special_unit_info_type, enum special_unit_info_tree, TDS_TRANSLATED_TYPES_LIST, TDS_NON_TRANSLATED_TYPES_LIST, TDS_TYPE_MAX_NR, FIRSTINFILE_MIN_IDX, FIRSTINFILE_MAX_IDX, HTML_GLOBAL_DIRECTIONS_LIST, RUD_DIRECTIONS_TYPES_LIST and RUD_FILE_DIRECTIONS_TYPES. 2024-07-29 Patrice Dumas * tp/Texinfo/Data/default_direction_strings.csv: fix order. * tp/maintain/generate_convert_data_perl_code.pl, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/OutputUnits.pm: gather directions orders from one place only, in generate_convert_data_perl_code.pl, setup get_directions_order in Texinfo::Data. 2024-07-29 Patrice Dumas * doc/texi2any_api.texi (Directions), tp/Texinfo/OutputUnits.pm (@relative_directions_order), tp/Texinfo/XS/main/tree_types.h (RUD_DIRECTIONS_TYPES_LIST): remove SectionNext, SectionPrev and SectionUp, they have no associated strings and have not be set for a long time. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h, tp/Texinfo/XS/main/option_types.h: add comment, move code around. 2024-07-29 Patrice Dumas * tp/maintain/generate_convert_data_perl_code.pl: process special units before directions. Change in spacing. * tp/Texinfo/Data/default_direction_strings.csv: change order to match better order in C enum. * tp/Texinfo/XS/main/utils.c: change in spacing. 2024-07-29 Patrice Dumas * tp/texi2any.pl: get file handle from XS for - too. 2024-10-01 Patrice Dumas * Makefile.am, ChangeLog: remove spurious references to copy-file_but_owner.c. copy-file_but_owner.c never existed in this timeline. 2024-07-28 Patrice Dumas * po_document/Makevars (XGETTEXT_OPTIONS): add cdt_tree and translate_convert_to_html_internal keywords. * Makefile.am (po_document-check): match translate_convert_to_html_internal. * tp/Texinfo/XS/convert/converter.c: mark @error translation as Texinfo code as a translated string with gdt_noop. * tp/Texinfo/XS/main/convert_utils.c (convert_utils_month_name): mark months for translation with gdt_noop. 2024-07-28 Patrice Dumas * po_document/Makevars (XGETTEXT_OPTIONS), tp/Texinfo/XS/main/utils.h (gdt_noop, pgdt_context_noop), tp/Texinfo/XS/main/utils.c (def_aliases), po_document/POTFILES.in: add gdt_noop and pgdt_context_noop cpp macros to mark strings for translation. Use in utils.c for def_aliases. Add to XGETTEXT_OPTIONS, and add main/utils.c to po_document/POTFILES.in. * Makefile.am (po_document-check): match gdt_noop and pgdt_context_noop. 2024-07-28 Patrice Dumas * Makefile.am (po_document-check), po_document/POTFILES.in: add an exception for main/DocumentXS.c in po_document-check, remove from POTFILES.in. 2024-07-28 Patrice Dumas * tp/Texinfo/XS/main/convert_utils.c (definition_category_tree): remove empty lines between TRANSLATORS comment and function call. * Makefile.am (po_document-check): consider C files, update matching to get functions used in C. * po_document/Makevars (XGETTEXT_OPTIONS): add C only keywords html_cdt_tree and gdt_tree. * po_document/POTFILES.in: add converter C files. 2024-07-28 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS): add pass-perl-format flag for __p. * Makefile.am (po-check): add missing keywords. 2024-07-28 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS): add c-format flag for line_error_ext. 2024-07-28 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS): fix line_error_ext argument number. 2024-07-28 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS): set pass-perl-format for __. Add c-format and perl-format for functions involved in error reporting. 2024-07-28 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS): remove --flag options of removed functions. 2024-07-28 Patrice Dumas * po_document/Makevars (XGETTEXT_OPTIONS): remove --language=Perl, it can be determined automatically, and could be C too. 2024-07-28 Patrice Dumas * po_document/Makevars (XGETTEXT_OPTIONS): disable default keywords. 2024-07-28 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS): disable default keywords. Add ngettext. Reorder. Remove unused keywords. 2024-07-28 Patrice Dumas * po/POTFILES.in: add tp/Texinfo/XS/convert/converter.c. 2024-07-28 Patrice Dumas Use separate po files for tp/Texinfo/XS gnulib * tp/Texinfo/XS/main/build_perl_info.c (init): call bindtextdomain for the texinfo_tp-gnulib separate domain. * po/POTFILES.in: remove tp/Texinfo/XS/gnulib/lib file. * Makefile.am (po-check): ignore tp/Texinfo/XS/gnulib/lib/*. 2024-10-01 Gavin Smith * doc/texinfo.texi (HTML Xref Link Basics, HTML Xref Configuration): Edit. Patch to documentation posted by Patrice, bug-texinfo 2024-08-23 and revised by Gavin. 2024-10-01 Patrice Dumas * tp/maintain/generate_convert_data_perl_code.pl: import File::Basename. 2024-10-01 Patrice Dumas * tp/maintain/generate_convert_data_perl_code.pl: use generating file basename in comment. 2024-07-28 Patrice Dumas * gnulib/m4: remove obsolete gnulib gettext module m4 files. 2024-10-01 Patrice Dumas * tp/Texinfo/XS/gnulib/lib/Makefile.am, tp/Texinfo/XS/gnulib/m4/gnulib-cache.m4, tp/Texinfo/XS/gnulib/po/POTFILES.in: update tp/Texinfo/XS gnulib. 2024-07-28 Patrice Dumas Setup separate po files directory for tp/Texinfo/XS directory gnulib * tp/Texinfo/XS: run gnulib-tool --add-import --po-base=gnulib/po --po-domain=texinfo_tp * tp/Texinfo/XS/Makefile.am (SUBDIRS), tp/Texinfo/XS/configure.ac (AC_CONFIG_FILES): update for tp/Texinfo/XS/gnulib/po/. * tp/Texinfo/XS/gnulib/m4: remove obsolete gnulib gettext module m4 files. 2024-07-28 Patrice Dumas Use separate po files for gnulib in info and install-info * info/info.c (main), install-info/install-info.c (main): call bindtextdomain for the PACKAGE "-gnulib" separate domain. * po/POTFILES.in: remove gnulib/lib files. * Makefile.am (po-check): ignore gnulib/lib/*. 2024-07-28 Patrice Dumas Setup separate po files directory for base directory gnulib run gnulib/gnulib-tool --add-import --po-base=gnulib/po --po-domain=texinfo * Makefile.am (SUBDIRS), configure.ac (AC_CONFIG_FILES): update for gnulib/po/. 2024-07-28 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (default_upper_case_commands): add, with @sc. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize) (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (COMMAND_INTEGER_INFORMATION, CONVERTER): add html_customized_upper_case_commands field in converter. Pass customized_upper_case_commands to converter_initialize instead of getting upper_case_commands directly from Perl converter. Initialize converter upper_case in html_converter_initialize based on defaults in default_upper_case_commands, and add html_customized_upper_case_commands information on top. 2024-07-27 Patrice Dumas * po_document/POTFILES.in: add tp/Texinfo/Data.pm. 2024-07-27 Patrice Dumas Use CSV files to store data relevant for Perl and C * tp/Texinfo/Data/default_css_element_class_styles.csv, tp/Texinfo/Data/default_direction_strings.csv, tp/Texinfo/Data/default_special_unit_info.csv, tp/Texinfo/Data/html_style_commands_element.csv, tp/maintain/generate_convert_data_perl_code.pl, tp/Makefile.am (dist_modules_DATA, dist_noinst_DATA, maintenance_files) (Texinfo/Data.pm), tp/Texinfo/Convert/HTML.pm: move %default_special_unit_info, %default_translated_special_unit_info, %default_converted_directions_strings, %default_translated_directions_strings, %default_css_element_class_styles and %style_commands_element to CSV files separated by | in tp/Texinfo/Data/. Add maintain/generate_convert_data_perl_code.pl to generate Perl data in Texinfo/Data.pm based on the CSV files data. 2024-10-01 Gavin Smith * doc/texinfo.texi (HTML Xref Configuration): edit description of splitting search order. 2024-07-27 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (html_get_css_elements_classes) (%default_css_element_class_styles): remove unused %css_rules_not_collected. 2024-10-01 Patrice Dumas update gnulib in tp/Texinfo/XS 2024-10-01 Patrice Dumas update gnulib in base directory 2024-07-27 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS): remove redundant keyword option. 2024-07-25 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_heading_command), tp/Texinfo/XS/convert/convert_html.c (convert_heading_command), tp/init/book.pm (book_convert_heading_command): use only one variable for toc and mini toc or menu. 2024-07-25 Patrice Dumas * tp/Texinfo/XS/parsetexi/input.c (set_input_encoding) (encode_file_name): add filename_encoding_conversion to cache the encoding conversion like reverse_iconv did previously. Reset in set_input_encoding. Call directly encode_with_iconv instead of encode_string. 2024-07-25 Patrice Dumas * tp/Texinfo/XS/parsetexi/input.c (set_input_encoding) (encode_file_name): use encode_string to encode the file name. Remove reverse_iconv. 2024-07-25 Patrice Dumas * tp/Texinfo/XS/parsetexi/input.c (set_input_encoding) (parser_reset_encoding_list): use the general input_conversions from utils.c in the parser. Remove parser_input_conversions. Do not call reset_encoding_list in parser_reset_encoding_list such that conversion code can reuse the converter setup for the parsing. 2024-07-25 Patrice Dumas * tp/Texinfo/XS/main/document.c (remove_document_descriptor): call unregister_document_hv. 2024-07-25 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_conversion_initialization), tp/Texinfo/XS/convert/convert_html.c (html_free_converter), tp/Texinfo/XS/main/api_to_perl.c (unregister_html_converter_perl_hv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): register the converter_info_hv in pl_info_hv field in converter to get a stable caching from C in Perl data, even if the Perl data changes. * tp/Texinfo/XS/main/api_to_perl.c (unregister_document_hv), tp/Texinfo/XS/main/build_perl_info.c (get_document, fill_document_hv), tp/Texinfo/XS/main/document_types.h (DOCUMENT): register the document HV in document to get a stable caching from C in Perl data, even if the Perl data changes. * tp/Texinfo/XS/convert/ConvertXS.xs (get_converter_indices_sorted_by_index) (get_converter_indices_sorted_by_letter), tp/Texinfo/XS/main/build_perl_info.c (BUILD_PERL_DOCUMENT_ITEM) (BUILD_PERL_DOCUMENT_LIST, document_global_information): use the C document hv field to cache Perl data instead of the passed document, in case it changed. A changed document happens for DocBook in tests as a copy of the document is made, with the same document descriptor and another object. * tp/Texinfo/XS/convert/build_html_perl_state.c (pass_sv_converter_info): use the Perl object in C to cache. 2024-07-24 Patrice Dumas * tp/t/03coverage_braces.t (nested_in_sc): do not set docbook as test_formats in the test specification, as docbook is already output. 2024-07-24 Patrice Dumas * tp/t/test_utils.pl (test): call explicitely Texinfo::Common::set_output_perl_encoding for HTML for outputting result files, as OUTPUT_PERL_ENCODING is not set if with XS and there is no user-defined functions called through the HTML customization API. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/main/call_perl_function.c (call_common_set_output_perl_encoding): add a call to Texinfo::Common::set_output_perl_encoding to be able to set OUTPUT_PERL_ENCODING from C. * tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_conversion_initialization): call call_common_set_output_perl_encoding if converter->external_references_number > 0. * tp/Texinfo/Common.pm (output_files_open_out): remove call to set_output_perl_encoding. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_prepare_converted_output_info, html_do_js_files): free default_document_language and preamble_document_language. Free jsdir. 2024-07-24 Patrice Dumas XS override for HTML::convert * tp/Texinfo/Convert/HTML.pm (%XS_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_convert): add an XS override for convert. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_output_units_global_targets), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_output_units_global_targets): remove code used in html_prepare_output_units_global_targets to pass data to Perl, put in html_pass_output_units_global_targets new function. 2024-07-24 Patrice Dumas XS override for HTML::output * tp/Texinfo/XS/convert/convert_html.c (do_jslicenses_file): remove a spurious end of line. * tp/Texinfo/XS/convert/convert_html.c (html_do_js_files): rename do_js_files as html_do_js_files. * tp/Texinfo/XS/convert/convert_html.c (html_finish_output): add. * tp/Texinfo/Convert/HTML.pm (%XS_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_output): add an XS override for output. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_conversion_output_units): move code setting Perl data from html_prepare_conversion_units to a new function, html_pass_conversion_output_units. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_units_directions_files): move code setting Perl data from html_prepare_units_directions_files to a new function, html_pass_units_directions_files. 2024-07-24 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_prepare_converted_output_info) (output), tp/Texinfo/XS/convert/convert_html.c (html_prepare_converted_output_info): move call of structure handler to the beginning of _prepare_converted_output_info out of output. * tp/Texinfo/Convert/HTML.pm (_finish_output, output): move code occuring at the end of output to a new function, _finish_output. 2024-07-24 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (XS_get_unclosed_stream): rename _XS_get_unclosed_stream as XS_get_unclosed_stream. * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/HTML.pm (output), tp/t/test_utils.pl (close_files), tp/texi2any.pl: handle undef converter_unclosed_files in texi2any.pl and test_utils.pl when processing the output of Texinfo::Common::output_files_unclosed_files by calling XS_get_unclosed_stream. Remove get_output_files_XS_unclosed_streams, now unneeded. 2024-07-24 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_prepare_converted_output_info) (output), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_converted_output_info), tp/Texinfo/XS/convert/convert_html.c (html_prepare_converted_output_info): move code from output, before and after _prepare_converted_output_info to _prepare_converted_output_info, including call of prepare_title_titlepage. Add arguments for prepare_title_titlepage. Update XS override and C code. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_conversion_finalization) (html_prepare_title_titlepage): remove calls of build_html_formatting_state, the functions do not set anything passed in build_html_formatting_state. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_title_titlepage), tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/get_html_perl_info.c: remove html_converter_prepare_output, which does nothing. Do not get jslicenses from Perl as they are setup in C. Remove html_converter_prepare_output_sv, which now does nothing. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_get_jslicenses_sv) (html_converter_prepare_output_sv): split html_get_jslicenses_sv out of html_converter_prepare_output_sv. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_internal_command_text): do not call build_html_formatting_state, there is nothing set in C that needs to be passed. 2024-09-30 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_command_description), tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_single_footnote): check and reset flags in build_html_formatting_state. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state): check and reset flags in build_html_formatting_state. Update callers. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_initialization_state): pass converter HV, not SV. * tp/Texinfo/XS/convert/ConvertXS.xs (html_conversion_initialization), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_conversion_initialization): move code passing information to Perl to html_pass_conversion_initialization from html_conversion_initialization. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_initialization_state): rename html_pass_converter_output_state as html_pass_converter_initialization_state. Update caller. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units): use C converter document name instead of document name coming from Perl. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides, _setup_output) (output), tp/Texinfo/XS/convert/ConvertXS.xs (html_setup_output): rename _init_output as _setup_output. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_setup_convert, convert), tp/Texinfo/XS/convert/convert_html.c (html_setup_convert), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_output_state, html_pass_converter_setup_state), tp/Texinfo/XS/convert/ConvertXS.xs (html_setup_output) (html_setup_convert, html_prepare_conversion_units): add _setup_convert call at the beginning of convert, that calls _init_conversion_after_setup_handler. Add an XS override for _setup_convert. Add html_pass_converter_setup_state to pass to Perl the information set in _setup_output or _setup_convert. Move setting use_unicode_text for Perl from html_pass_converter_output_state to html_pass_converter_setup_state. * tp/Texinfo/XS/convert/convert_html.c (html_setup_output): rename setup_status as setup_handler_status. 2024-07-24 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (file_error_or_write_close): return -2 if the file stream is 0. * tp/Texinfo/XS/convert/convert_html.c (html_node_redirections): do not return an error immediately from the function in case of open error, as in Perl. 2024-09-30 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (do_js_files): use copy_file_to. 2024-07-23 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_do_jslicenses_file): check path before gathering the output. * tp/Texinfo/XS/convert/convert_html.c (file_error_or_write_close) (do_jslicenses_file, do_js_files, html_convert_output): add file_error_or_write_close with code from html_convert_output. Implement do_jslicenses_file and do_js_files in C. 2024-07-23 Patrice Dumas * tp/Texinfo/Common.pm (output_files_open_out), tp/Texinfo/Convert/HTML.pm (convert, output): do not call set_output_perl_encoding in convert nor output, but in output_files_open_out just before it is needed. * tp/Texinfo/Convert/HTML.pm (_do_js_files): close FH only if it was opened. 2024-07-23 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_conversion_initialization), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_output_state): always set converter_info in Perl converter for calls to get_info in Perl, which can happen anywhere. 2024-09-30 Patrice Dumas Add gnulib copy-file module * tp/Texinfo/XS: Run "gnulib-tool --add-import copy-file" 2024-07-23 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_do_js_files): encode $jsdir before creating the directory. Create the directory by calling create_destination_directory(). 2024-07-23 Patrice Dumas * tp/Texinfo/XS/convert/converter.h (PATHS_INFORMATION) (conversion_paths_info), tp/Texinfo/XS/convert/converter.c: rename conversion_paths_information as conversion_paths_info and PATHS_INFORMATION union paths as p. 2024-07-23 Patrice Dumas * tp/Texinfo/XS/main/command_data.awk (BEGIN, END), tp/maintain/regenerate_C_options_info.pl: add/remove newlines and add a comment in generated C files. 2024-07-23 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (init), tp/Texinfo/XS/convert/converter.c (setup_converter_paths_information), tp/Texinfo/XS/convert/converter.h (INSTALLED_PATHS, UNINSTALLED_PATHS) (PATHS_INFORMATION), tp/Texinfo/XS/main/build_perl_info.c (init), tp/Texinfo/XS/parsetexi/Parsetexi.xs (init), tp/Texinfo/XSLoader.pm (init): exchange second and third paths argument of init called from XSLoader.pm and setup_converter_paths_information for more logical groupings. Consider paths in XS init functions as SV * as some are necessarily undef. In ConvertXS.xs init, convert only some SV * path to char based on texinfo_uninstalled, other remain NULL. Modify PATHS_INFORMATION struct to ba a union of INSTALLED_PATHS and UNINSTALLED_PATHS. Setup conversion_paths_information accordingly in setup_converter_paths_information. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (init), tp/Texinfo/XS/convert/converter.c (setup_converter_paths_information) (conversion_paths_information), tp/Texinfo/XS/convert/converter.h (PATHS_INFORMATION): add the PATHS_INFORMATION structure and a global variable conversion_paths_information. Fill the paths with setup_converter_paths_information called from ConvertXS.xs init. 2024-07-23 Patrice Dumas * tp/Texinfo/XS/TestXS.xs (PREFIX, xstest_init): use xstest_ as prefix. Update xstest_init call. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (init), tp/Texinfo/XS/main/build_perl_info.c (init), tp/Texinfo/XS/parsetexi/Parsetexi.xs (init), tp/Texinfo/XSLoader.pm (init): pass more ModulePath paths to init functions called by XSLoader.pm when initializing XS modules. 2024-09-30 Gavin Smith * INSTALL.generic: sync from gnulib 2024-07-23 Patrice Dumas * tp/Texinfo/XS/XSParagraph.xs, tp/Texinfo/XS/xspara.c: remove xspara_init, as it does nothing. 2024-07-22 Patrice Dumas * tp/Makefile.am (test_files): fix file name. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (init), tp/Texinfo/XS/parsetexi/Parsetexi.xs (init): add const for path. Use the same names for path everywhere. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_converted_output_info): remove unused variable. * tp/Texinfo/XS/convert/build_html_perl_state.c (pass_sv_converter_info): call bug if the converter_info is not known. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c (pass_sv_converter_info): replace redundant non_breaking_space by missing line_break_element. * tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_output_state): remove code setting converter_info Perl data, as it is now done in pass_sv_converter_info on demand. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_init_output) (html_prepare_simpletitle, html_prepare_converted_output_info) (html_prepare_title_titlepage): remove code setting converter_info Perl data, as it is now done in pass_sv_converter_info on demand. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (set_special_units_targets_files): reuse a TEXT for all the file names. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c (pass_sv_converter_info): increase new_sv ref count when storing. 2024-07-22 Patrice Dumas XS override for HTML::get_info * tp/Texinfo/XS/convert/ConvertXS.xs (html_conversion_initialization): always set the Perl document hash reference in the Perl converter, as it is not stored in C data. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_get_info), tp/Texinfo/XS/convert/build_html_perl_state.c (pass_sv_converter_info): XS override for get_info, with caching in $self->{'converter_info'}. Note that either Perl code or XS code is used, so this is for consistency not really for interoperability. * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/init_files_tests.t (access_document_name_in_handler): add a test accessing document_name through get_info() in an handler and using it as a scalar reference in buttons. This tests that get_info gives a correct information even if there is no Perl external reference called from XS, and nothing is exported to Perl, self->external_references_number == 0. 2024-07-22 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (conversion_initialization), tp/Texinfo/XS/convert/ConvertXS.xs: merge _initialize_output_state in conversion_initialization in Perl. Remove _initialize_output_state override and remove html_initialize_output_state from ConvertXS.xs. 2024-07-22 Patrice Dumas XS override for HTML::conversion_initialization * tp/Texinfo/Convert/HTML.pm (conversion_initialization, convert) (output), tp/t/accents.t: pass context as second argument of conversion_initialization. * tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_document), tp/Texinfo/XS/main/build_perl_info.c (pass_document_to_converter_sv): move setting Perl data code out of converter_set_document to a new function pass_document_to_converter_sv in build_perl_info.c. * tp/Texinfo/XS/main/get_perl_info.c (converter_set_document_from_sv): allow a NULL document_in argument. * tp/Texinfo/XS/convert/ConvertXS.xs (html_initialize_output_state), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_output_state): set use_unicode_text in build_html_perl_state.c. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides, convert) (output), tp/Texinfo/XS/convert/ConvertXS.xs (html_conversion_initialization, html_init_output) (html_prepare_simpletitle), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_output_state): add an XS override for conversion_initialization. Update html_pass_converter_output_state with a document_in argument to set converter_info and other Perl data. Call Texinfo::Common::set_output_perl_encoding in Perl convert and output as there is no corresponding code in C/XS. Export to Perl only if self->external_references_number > 0, except for jslicenses that are always passed, as they are always used in Perl. * tp/Texinfo/XS/convert/get_html_perl_info.c: add const. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/main/api_to_perl.c (get_perl_scalar_reference_value): return 0 if the reference is undef or the value is undef. 2024-07-22 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_initialize_output_state): pass information to Perl only if Perl code will be called from C. 2024-07-22 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides, _init_output): remove call to _XS_reset_output_init_conf, the function and the override. The whole _init_output function is already overriden. 2024-09-30 Patrice Dumas Update test results 2024-07-22 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_initialize_output_state) (_init_output), tp/Texinfo/XS/convert/ConvertXS.xs (html_initialize_output_state), tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state, html_init_output): move code completing configuration from _init_output to _initialize_output_state such that it is set for convert() too. * tp/Texinfo/Convert/HTML.pm (_init_conversion_after_setup_handler) (_init_output, convert), tp/Texinfo/XS/convert/ConvertXS.xs (html_initialize_output_state, html_init_output) (html_prepare_conversion_units), tp/Texinfo/XS/convert/convert_html.c (init_conversion_after_setup_handler): add init_conversion_after_setup_handler for code common to output and convert, that is better run, in output(), after the first stage handler. * tp/Texinfo/Convert/HTML.pm (_init_output), tp/Texinfo/XS/convert/convert_html.c (html_init_output): move code around to register output_init_conf late after setting more customization variables, including based on document. 2024-07-21 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (convert_tree_new_formatting_context): no need for transmission of multiple_pass to Perl anymore. 2024-07-21 Patrice Dumas * tp/Texinfo/XS/main/command_stack.c (push_string_stack_string): handle pushing NULL on a string_stack. * tp/Texinfo/Convert/HTML.pm (_internal_command_text) (convert_tree_new_formatting_context, _set_multiple_conversions) (_unset_multiple_conversions), tp/Texinfo/XS/convert/convert_html.c (html_set_multiple_conversions, html_unset_multiple_conversions) (convert_tree_new_formatting_context, html_internal_command_text): add multiple pass string argument to set_multiple_conversions, push on multiple_pass stack in the function and pop in unset_multiple_conversions. Add html_set_multiple_conversions and html_unset_multiple_conversions to C. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), (_initialize_output_state, conversion_initialization), tp/Texinfo/XS/convert/ConvertXS.xs (html_set_multiple_conversions) (html_unset_multiple_conversions, html_in_multi_expanded): add XS override for in_multi_expanded, update XS overrides for the changes in html_unset_multiple_conversions and html_set_multiple_conversions. 2024-07-21 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_initialize_output_state), (conversion_initialization), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files) (html_prepare_output_units_global_targets): initialize global_units_directions in _initialize_output_state and remove call of pass_html_global_units_directions from html_prepare_units_directions_files and html_prepare_output_units_global_targets as the hash is not accessed at all from Perl with XS with the global_direction_unit override. 2024-07-21 Patrice Dumas XS override for HTML::global_direction_unit * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_global_direction_unit) (html_prepare_units_directions_files) (html_prepare_output_units_global_targets), tp/Texinfo/XS/convert/convert_html.c (compare_global_units_direction_name) (html_setup_global_units_direction_names) (html_find_direction_name_global_unit, html_reset_converter), tp/Texinfo/XS/main/converter_types.h (SPECIAL_UNIT_DIRECTION_LIST) (CONVERTER): setup a sorted list of SPECIAL_UNIT_DIRECTION with direction name and output unit for global directions, including of special output units with html_setup_global_units_direction_names, called from html_prepare_units_directions_files and html_prepare_output_units_global_targets. Add an XS override for global_direction_unit that uses a bsearch to find the output unit and the associated Perl object. 2024-09-30 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.h: move back get_converter_perl_info.c functions declarations to get_converter_perl_info.h. 2024-07-21 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (set_document): remove a redundant condition on $XS_convert. * tp/Texinfo/XS/convert/ConvertXS.xs (converter_initialize): converter_descriptor is necessarily set. * tp/Texinfo/XS/main/get_perl_info.c (converter_set_document_from_sv): return the converter. * tp/Texinfo/Convert/Converter.pm (set_document), tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_document), tp/Texinfo/XS/main/build_perl_info.c (build_convert_text_options): add build_convert_text_options. Setup more Perl structures in converter_set_document in ConvertXS.xs, renaming converter_set_document_from_sv to converter_set_document. 2024-07-21 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_document_from_sv), tp/Texinfo/XS/convert/converter.c (converter_set_document), tp/Texinfo/XS/main/get_perl_info.c (converter_set_document_from_sv): rename converter_set_document as converter_set_document_from_sv in get_perl_info.c. Add converter_set_document in converter.c to do the C part of converter_set_document_from_sv. 2024-07-21 Patrice Dumas * tp/Texinfo/Common.pm (set_output_encoding) (set_output_perl_encoding), tp/Texinfo/Convert/Converter.pm (set_document), tp/Texinfo/Convert/Text.pm (output) tp/texi2any.pl: split set_output_perl_encoding out of set_output_encodings. Rename set_output_encodings as set_output_encoding, update callers. 2024-07-21 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_text) (_initialize_output_state), tp/t/init/spaces_in_line_breaks.init _texi2any_tests_set_line_break_element), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_output_state): access 'line_break_element' through get_info only. 2024-07-21 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (substitute_html_non_breaking_space) (_initialize_output_state), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_output_state): access 'non_breaking_space' through get_info only. 2024-07-20 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (special_characters_formatting): fix right quote numerical entity. * tp/Texinfo/Convert/HTML.pm (_initialize_output_state) (conversion_initialization): move Perl code related to setting up non_breaking_space, paragraph_symbol, resetting some configuration based on special characters and line_break_element from conversion_initialization to _initialize_output_state. 2024-07-20 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_initialize_output_state) (conversion_initialization), tp/Texinfo/XS/convert/build_html_perl_state.c (build_directions_strings, html_pass_converter_output_state): build directions_strings from XS. Move Perl code related to setting up directions_strings from conversion_initialization to _initialize_output_state. 2024-09-30 Patrice Dumas * tp/Texinfo/XS/Makefile.am (ConvertXS_la_SOURCES): remove convert_html.c to only use shared data in libtexinfo-convert. 2024-07-20 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (no_arg_formatted_cmd), tp/Texinfo/XS/convert/convert_html.h (no_arg_formatted_cmd): make extern. * tp/Texinfo/Convert/HTML.pm (_initialize_output_state) (conversion_initialization), tp/Texinfo/XS/convert/build_html_perl_state.c (build_no_arg_commands_formatting, html_pass_converter_output_state): build no_arg_commands_formatting from XS. Move Perl code related to setting up no_arg_commands_formatting from conversion_initialization to _initialize_output_state. 2024-07-20 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_xhtml_re_close_lone_element): do not close again an already closed lone element. Do not match < to find the closing >. * tp/Texinfo/XS/convert/convert_html.c (xhtml_re_close_lone_element): implement in C. * tp/Texinfo/XS/convert/converter.c (set_conf): return a status. * tp/Texinfo/XS/convert/convert_html.c (close_lone_conf_element) (html_initialize_output_state): do all the initializations as in Perl. * tp/Makefile.tres, tp/t/html_tests.t (xhtml_rule_element_already_closed): new test. 2024-07-20 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_free_converter): free self->html_stage_handlers lists and handlers priority information. 2024-07-20 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/convert/convert_html.c (free_html_command_conversion, html_free_converter): get customized_no_arg_commands_formatting from Perl. Add free_html_command_conversion based on html_free_converter code. Free customized_no_arg_commands_formatting in html_free_converter. * tp/Texinfo/XS/convert/convert_html.c (reset_unset_no_arg_commands_formatting_context) (complete_no_arg_commands_formatting): move code above. * tp/Texinfo/XS/convert/ConvertXS.xs (html_initialize_output_state), tp/Texinfo/XS/convert/convert_html.c (set_no_arg_commands_formatting) (html_format_setup, copy_html_command_conversion) (html_initialize_output_state): set unset in default_no_arg_commands_formatting for preformatted and string context when needed, fix * command formatting, use unicode_character_brace_no_arg_commands[cmd].text for ASCII characters. Set self->html_command_conversion for no arg commands based on self->customized_no_arg_commands_formatting, output_no_arg_commands_formatting, and possibly unicode characters. Reset ul.mark-* css_strings if needed. Do not call html_conversion_initialization_sv in html_initialize_output_state as Perl information is not needed anymore there. 2024-07-19 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (clear_direction_string_type) (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): get customized_direction_strings from Perl. * tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state), tp/Texinfo/XS/convert/get_html_perl_info.c (html_conversion_initialization_sv): setup directions_strings in C only, in html_initialize_output_state, using customized_direction_strings. 2024-07-19 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (unicode_entities) (html_format_setup): setup unicode_entities. * tp/Texinfo/XS/convert/convert_html.c (html_format_setup), tp/Texinfo/XS/main/unicode.h (ENCODING_CODEPOINTS), tp/maintain/setup_converters_code_tables.pl: add unicode_character_brace_no_arg_commands css_string field. Set it up with Perl code. Set default_no_arg_commands_formatting css_string based on unicode_character_brace_no_arg_commands css_string and on other existing @-commands formatting tables to text. * tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state): use unicode_entities and line_break_element to setup output_no_arg_commands_formatting 2024-07-18 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state): strdup special character for output_no_arg_commands_formatting. * tp/Texinfo/XS/convert/ConvertXS.xs (html_initialize_output_state): call html_conversion_initialization_sv after html_initialize_output_state to have self->special_character set. * tp/Texinfo/XS/convert/convert_html.c (substitute_html_non_breaking_space): initialize result to an empty string. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_conversion_initialization_sv): setup converter->directions_strings based on Perl $self->{'customized_direction_strings'} or converter->default_converted_directions_strings, not from Perl $self->{'direction_strings'}. 2024-07-18 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_prepare_css): initialize css_import_lines and css_rule_lines only if there are css files, from valgrind. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): initialize stage handlers only if there is at least one. * tp/Texinfo/Convert/HTML.pm (_XS_html_converter_initialize) (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/convert_html.c (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): pass default_converted_directions_strings from Perl to default_converted_directions_strings in converter. 2024-07-18 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (determine_files_and_directory): free input_file_name, input_basename_for_outfile and document_path, found with valgrind. 2024-07-14 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%special_characters) (conversion_initialization): remove _set_non_breaking_space. Add $xml_named_entity_nbsp as entity of non_breaking_space. Simplify code setting conf_default_no_arg_commands_formatting_normal to non_breaking_space for space commands. * tp/Texinfo/XS/main/build_perl_info.c (build_expanded_formats): return an HV, not an SV. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_is_format_expanded): add an XS override for is_format_expanded. * tp/Texinfo/Convert/Converter.pm (_internal_converter_initialize) (converter), tp/Texinfo/XS/convert/ConvertXS.xs (converter_initialize, html_converter_initialize_sv), tp/Texinfo/XS/main/get_perl_info.c (converter_initialize): rename _XS_converter_initialize as _internal_converter_initialize. Add code in _internal_converter_initialize for initialization either in generic XS converter or in Perl. Build expanded_formats in XS in converter_initialize. Use _internal_converter_initialize for code setting $converter->{'expanded_formats'} in Perl. * tp/Texinfo/Convert/HTML.pm (%default_css_element_class_styles): rename %css_element_class_styles as %default_css_element_class_styles. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/Convert/HTML.pm (conversion_initialization), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv, html_conversion_initialization_sv): pass default_css_element_class_styles to html_converter_initialize_sv. Use css_set_selector_style call instead of modifying directly $self->{'css_element_class_styles'}. * tp/Texinfo/XS/convert/convert_html.c (spaces_cmd) (html_initialize_output_state): preliminary code setting output_no_arg_commands_formatting in C based on default_no_arg_commands_formatting and non-breaking spaces. * tp/Texinfo/XS/convert/ConvertXS.xs (html_initialize_output_state), tp/Texinfo/XS/convert/build_html_perl_state.c (html_pass_converter_output_state): pass non-breaking space, paragraph_symbol, line_break element and expanded_formats in converter_info in XS. For now this is redundant with Perl, but this should change. * tp/Texinfo/Convert/HTML.pm (conversion_initialization): reorder code. 2024-07-13 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv, html_conversion_initialization_sv): move setup of translated_direction_strings out of html_conversion_initialization_sv to html_converter_initialize_sv. 2024-07-13 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_XS_html_converter_initialize) (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): remove default_no_arg_commands_formatting argument. 2024-09-29 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES) (nodist_IndicesXS_la_SOURCES, ConvertXS_la_SOURCES): put converter C files in libtexinfo_convert_la_SOURCES. 2024-07-13 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES, EXTRA_DIST) (BUILT_SOURCES), tp/Texinfo/XS/main/convert_to_text.c, tp/maintain/setup_converters_code_tables.pl: merge cmd_symbol.c in cmd_text.c and setup cmd_text.c as a separately built file. * tp/Texinfo/XS/Makefile.am (ConvertXS_la_SOURCES, EXTRA_DIST), tp/Texinfo/Convert/Converter.pm (%xml_text_entity_no_arg_commands), tp/maintain/setup_converters_code_tables.pl: make %xml_text_entity_no_arg_commands our. Setup cmd_converter.c with xml_text_entity_no_arg_commands in C. * tp/Texinfo/XS/convert/converter.c (xml_text_entity_no_arg_commands_formatting, converter_setup), tp/Texinfo/XS/convert/ConvertXS.xs (init): setup xml_text_entity_no_arg_commands_formatting. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_XS_format_setup, import), tp/Texinfo/XS/convert/ConvertXS.xs (html_format_setup), tp/Texinfo/XS/convert/convert_html.c (html_format_setup): rename _XS_format_init as _XS_format_setup and html_format_init as html_format_setup. Rename nr_default_commands_args variable as default_commands_args_nr. * tp/Texinfo/XS/convert/convert_html.c (no_arg_formatted_cmd) (html_format_setup, html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (no_arg_formatted_cmd): make no_arg_formatted_cmd a static variable instead of being in a converter, and setup no_arg_formatted_cmd in html_format_setup. Update users. * tp/Texinfo/XS/convert/convert_html.c (default_no_arg_commands_formatting, html_format_setup): prepare default_no_arg_commands_formatting. 2024-07-12 Patrice Dumas * tp/Texinfo/XS/main/convert_to_text.c, tp/Texinfo/XS/main/unicode.c, tp/Texinfo/XS/main/unicode.h (ENCODING_CODEPOINTS, COMMAND_UNICODE) (DIACRITIC_UNICODE), tp/Texinfo/XS/main/utils.h, tp/maintain/setup_accent_tables.pl, tp/maintain/setup_converters_code_tables.pl: add const. * tp/maintain/setup_converters_code_tables.pl: simplify code for unicode now that there are no empty strings anymore. 2024-07-12 Patrice Dumas * tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/Unicode.pm: no more empty strings in %unicode_map values. 2024-07-12 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize) (conversion_initialization): get customization from GNUT_get_direction_string_info in converter_initialize, set $self->{'customized_direction_strings'} and use it in conversion_initialization. 2024-07-12 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize) (conversion_initialization): get customization from GNUT_get_no_arg_command_formatting in converter_initialize, set $self->{'customized_no_arg_commands_formatting'} and use it in conversion_initialization. 2024-07-12 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize) (conversion_initialization): move setup of $self->{'translated_direction_strings'} based on defaults and user defined customization to converter_initialize. 2024-07-12 Patrice Dumas * tp/t/input_files/command_non_break_spaces_koi8.texi, tp/t/input_files/command_non_break_spaces_utf8.texi, tp/Makefile.am (test_files), tp/t/init/t2h_buttons.pm, tp/tests/many_input_files/for_nbspaces_different_encodings.sh: add buttons with non-breaking spaces to the test. 2024-07-12 Patrice Dumas * tp/Makefile.am (test_files), tp/t/input_files/command_non_break_spaces_koi8.texi, tp/t/input_files/command_non_break_spaces_utf8.texi, tests/many_input_files/for_nbspaces_different_encodings.sh, tp/tests/many_input_files/Makefile.am (TESTS, tests_dirs): add test of expansion of non-breaking space in HTML with OUTPUT_CHARACTERS=1 and a file with a non-breaking space in the character set followed by another with the character set, to check that for the second an entity is output for the non-breaking space. 2024-07-11 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%css_no_arg_commands): remove tie, as the Texinfo::Common::text_brace_no_arg_commands value is ok, and remove 'today' as it is useless. 2024-07-11 Patrice Dumas * tp/Texinfo/Convert/Unicode.pm (%unicode_map, %extra_unicode_map): remove commands associated with empty string. Add all the commands in comment to simplify visual comparison with other similar maps. 2024-07-11 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%css_no_arg_commands): add error as undef and do not set if %css_no_arg_commands command value is undef. Use Texinfo::Common::text_brace_no_arg_commands instead of other values of default_no_arg_commands_formatting. 2024-07-10 Patrice Dumas * tp/Texinfo/Common.pm (%text_brace_no_arg_commands): reorder. * tp/Texinfo/Convert/Converter.pm (%xml_text_entity_no_arg_commands) (%xml_text_entity_no_arg_commands_formatting): add %xml_text_entity_no_arg_commands with specific commands previously set in %xml_text_entity_no_arg_commands_formatting, and &. Reorder. Comment out commands that are the same as in %Texinfo::Common::text_brace_no_arg_commands. Complete %xml_text_entity_no_arg_commands_formatting with Texinfo::Common::text_brace_no_arg_commands and Texinfo::Common::nobrace_symbol_text for commands not already set. * tp/Texinfo/Common.pm (%text_brace_no_arg_commands) (%xml_text_entity_no_arg_commands): remove today. * tp/Texinfo/Convert/HTML.pm (%css_no_arg_commands), tp/Texinfo/Convert/NodeNameNormalization.pm (%normalize_node_nobrace_symbol_text): add today. * tp/Texinfo/Convert/HTML.pm (_translate_names): remove a useless possibility in a condition. 2024-07-09 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%default_no_arg_commands_formatting): for css_string preset explicitly @tie and @* values, and use nobrace_symbol_text preferentially to preformatted/normal values. 2024-07-09 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%default_no_arg_commands_formatting): reset explicitly & value. * tp/t/html_tests.t ($itemize_arguments_text): add @& and @ampchar to tests. 2024-07-08 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (remove_extension, canonpath) (STRING_AND_LEN, texinfo_extensions, determine_files_and_directory) (create_destination_directory): implement determine_files_and_directory and create_destination_directory in C. * tp/Texinfo/Convert/HTML.pm (_init_output, output), tp/Texinfo/XS/convert/ConvertXS.xs (html_init_output), tp/Texinfo/XS/convert/convert_html.c (html_init_output) (html_reset_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add determine_files_and_directory, create_destination_directory and destination_directory and document_name registering to _init_output instead of output and implement in C/XS. * tp/Texinfo/XS/convert/convert_html.c (html_process_css_file): remove a useless strdup. 2024-07-08 Patrice Dumas * tp/Texinfo/XS/main/utils.c (parse_file_path), tp/Texinfo/XS/parsetexi/api.c: move parse_file_path to utils.c. 2024-07-08 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (init): set encoding conversion for input_conversions to utf-8 before anything else, to be sure that the conversion to utf-8 gets initialized. 2024-07-08 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory): reuse document_path for output_file instead of removing the extension again. 2024-07-07 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_init_output, output), tp/Texinfo/XS/convert/convert_html.c (html_process_css_file) (html_prepare_css, html_init_output): move _prepare_css call to _init_output. Implement in C. 2024-07-07 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_simpletitle): call build_simpletitle with converter_info. * tp/Texinfo/Convert/HTML.pm (_init_output, output), tp/Texinfo/XS/convert/ConvertXS.xs (html_init_output), tp/Texinfo/XS/convert/build_html_perl_state.c (pass_jslicenses), tp/Texinfo/XS/convert/convert_html.c (contents_elements_options) (conf_for_documentlanguage, fill_jslicense_file_info) (html_init_output): move BODY_ELEMENT_ATTRIBUTES setting and some set_global_document_commands calls to init_output. Move jslicences data setting to init_output, add to XS interface and add pass_jslicenses to build jslicense data from C to Perl. 2024-09-29 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (converter_set_document, converter_initialize) (reset_output_init_conf), tp/Texinfo/XS/main/get_perl_info.c: move converter_set_document, converter_initialize and reset_output_init_conf to get_converter_perl_info.c. 2024-07-07 Patrice Dumas * tp/Texinfo/XS/main/utils.c (html_free_direction_icons): reset number and list to 0 as the icon list structure may be reused. * tp/Texinfo/XS/convert/converter.c, tp/Texinfo/XS/main/utils.c (copy_option), tp/Texinfo/XS/main/api_to_perl.c (register_perl_button): move copy_option to utils.c and add the missing types. For the list buttons, add register_perl_button to be able to increase the reference counter of a copied button Perl reference. * tp/maintain/regenerate_C_options_info.pl: add copy_options automatically generated function to copy a whole OPTIONS structure. * tp/Texinfo/Convert/HTML.pm (_init_output, output), tp/Texinfo/XS/convert/convert_html.c (html_init_output): move init_conf setup to _init_output, using copy_options. * tp/Texinfo/XS/main/get_perl_info.c: minor changes. 2024-09-29 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_init_output): set MATHJAX_CONFIGURATION. 2024-07-07 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (set_conf, force_conf) (set_conf_internal), tp/Texinfo/XS/main/get_perl_info.c (set_sv_conf) (force_sv_conf): add set_conf and force_conf in converter.c. rename set_conf as set_sv_conf and force_conf as force_sv_conf in get_perl_info.c. * tp/Texinfo/XS/convert/convert_html.c (html_reset_converter): free shared_conversion_state.formatted_index_entries only if it was set. * tp/Texinfo/XS/main/utils.c (null_device_names): add. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides, _init_output) (output), tp/Texinfo/XS/convert/ConvertXS.xs (html_init_output) (html_prepare_conversion_units), tp/Texinfo/XS/convert/convert_html.c (html_init_output), tp/Texinfo/XS/main/build_perl_info.c (latex_build_options_for_convert_to_latex_math): split the beginning of output in _init_output. Add an implementation in C of init_output and an XS interface. Add latex_build_options_for_convert_to_latex_math for the XS interface. Increase external_references_number based on INTERNAL_LINKS and CONVERT_TO_LATEX_IN_MATH in html_init_output instead of html_prepare_conversion_units. * tp/Texinfo/XS/convert/converter.c (copy_option): reindent. 2024-07-06 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_prepare_output_sv): fix the index in AV of the jslicense file info data. 2024-07-06 Patrice Dumas * tp/Texinfo/XS/convert/call_html_perl_function.c (call_stage_handler), tp/Texinfo/XS/convert/convert_html.c (html_stage_handler_stage_type_names, run_stage_handlers), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (enum html_stage_handler_stage_type, HTML_STAGE_HANDLER_INFO) (HTML_STAGE_HANDLER_INFO_LIST, CONVERTER): get stage handlers from Perl and put them in HTML_STAGE_HANDLER_INFO_LIST structure in converter. Add run_stage_handlers and call_stage_handler to call Perl registered stage handlers references. 2024-07-06 Patrice Dumas * tp/Texinfo/XS/main/utils.h, tp/Texinfo/XS/convert/convert_html.h: move declaration of html_argument_formatting_type_names to convert_html.h. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (converter_initialize, output): move the call of Texinfo::Config::GNUT_get_stage_handlers to converter_initialize. 2024-07-06 Patrice Dumas * tp/init/book.pm (book_unit_file_name), tp/t/init/misc_file_collision.init (test_misc_file_name), tp/t/init/only_toc_out.init (toc_out_element_file_name): access 'document_name' through get_info API only. * tp/Texinfo/Convert/HTML.pm (_set_non_breaking_space) (conversion_initialization, _prepare_title_titlepage) (_prepare_simpletitle, convert, _prepare_converted_output_info) (output, get_info), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_converted_output_info, html_prepare_title_titlepage), tp/Texinfo/XS/convert/build_html_perl_state.c (build_simpletitle), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_prepare_output_sv): set converter_info information directly, not from the converter hash, as soon as the information is ready. Do not set the converter_info information in converter hash unless it is directly accessed for speed. Also do not set converter_info information as a reference on string, always set a string directly. Remove _reset_info. * tp/Texinfo/Convert/HTML.pm: remove $xml_numeric_entity_nbsp, it is unused. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm: call internal functions as subroutines, not as object oriented methods. Reindent. 2024-07-06 Patrice Dumas * tp/Texinfo/XS/MiscXS.xs (xs_process_text, xs_unicode_text) (xs_entity_text, xs_default_format_protect_text): use SvPVutf8_nolen to get SV argument and convert to text more simply. 2024-07-06 Patrice Dumas * tp/Texinfo/XS/MiscXS.xs (xs_process_text), tp/Texinfo/Convert/Plaintext.pm (_process_text_internal): add prototype. * tp/Texinfo/Convert/Plaintext.pm: call internal functions as subroutines, not as object oriented methods. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Info.pm (_convert): add _suppress_styles type that sets suppress_styles. * tp/Texinfo/Convert/Info.pm (format_ref): convert @*ref using translations for all the possible cases of arguments of @*ref. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Info.pm (format_ref), tp/Texinfo/Convert/Plaintext.pm (format_ref): double check that a reference is an internal reference before using the normalized reference as label. * tp/Makefile.tres, tp/t/info_tests.t (similar_external_and_internal_node): add a test with external and internal references with the same normalized node names. 2024-07-06 Patrice Dumas * tp/t/21multitable.t (ref_in_multitable), tp/t/converters_tests.t (refs_formatting, top_in_ref, ref_error_formatting) (ref_in_sectioning): add info as formatted output. * tp/t/info_tests.t (del_quote_linebreaking, xref_quote_long_item), tp/t/plaintext_tests.t, tp/Makefile.tres: move tests from plaintext_tests to info_tests. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (format_ref): do not prepend :: at the end of a reference. Move code auround. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (format_ref): no see for @ref. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (format_ref): use see and See instead of *note and *Note. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (format_ref): simplify output of reference name. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (format_ref): never quote node names and labels. Do not add Top if there is no node. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (format_ref): do not add a full stop after a ref command not followed by a comma or full stop. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (format_ref, _convert), tp/Texinfo/Convert/Info.pm (format_ref): split format_ref function out of _convert to format *ref commands. Put format_ref both in Plaintext.pm and Info.pm to be able to format cross references differently in both formats. * tp/Texinfo/Convert/Plaintext.pm (format_ref): do not treat reference in multitable as if they were in @w. Do not disallow breaks. 2024-07-06 Patrice Dumas Convert definition line parts in plaintext in code style only when needed * tp/Texinfo/Convert/Plaintext.pm (_convert_def_line), NEWS: explicitly convert definition name, class and arguments in code style. Do not convert category nor leading dashes in code style. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm: reindent. Change FIXMEs to TODO. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): common if for type defined for text elements. Bug message if in top level and the text element is not normal text (without type). 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): ignore space types only when checking if an index command is last in node, as the ignored special containers cannot happen in that situation. Remove %ignorable_types. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert, converter_initialize): use directly %ignored_types and %ignorable_space_types. * tp/Texinfo/Convert/Plaintext.pm (_convert, %ignorable_space_types): handle text elements before other elements. Remove spaces_before_paragraph from %ignorable_space_types and handle it in one place only. 2024-07-06 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm: remove an obsolete FIXME. 2024-07-05 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm: remove a FIXME on @cartouche, the output is already correct. * tp/Makefile.tres, tp/t/plaintext_tests.t (cartouche_and_paragraph_indentation): add a test for cartouche and paragraph indentation. 2024-07-05 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): do not copy $self->{'current_roots'}, iterate over it starting from the end. 2024-07-05 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): use directly $self->{'current_roots'} element contents instead of using $self->{'current_contents'}. Remove $self->{'current_contents'}. 2024-07-05 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): use parent contents to get the contents a ref command is in. 2024-07-05 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): remove an obsolete FIXME. Add a comment with an explanation why there is a warning for @xref not followed by comma or full stop. 2024-07-04 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): try to make code finding next @*ref element more straightforward. 2024-07-04 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (process_printindex): output for @seeentry and @seealso. 2024-07-03 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): remove condition on line definition command now that it is handled directly. * tp/Texinfo/Convert/DocBook.pm (_convert): remove FIXME. 2024-07-03 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_convert): use direcly braced element for multitable prototype. Other minor changes. * tp/Makefile.tres, tp/t/converters_tests.t (multitable_prototypes): add a test with multitable prototypes, including @-commands, spaces and erroneus construct, for output in all the conversion formats. 2024-07-03 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_convert): rearrange conditions nesting for clearer code. 2024-07-03 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_sp_command), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/XS/convert/convert_html.c (convert_sp_command): consider empty @sp argument to be 1, to have an output more consistent with Texinfo TeX. * tp/Texinfo/Convert/LaTeX.pm (_convert): consider empty @sp argument to be empty. * tp/Makefile.tres, tp/t/converters_tests.t (sp_empty_lines_1_no_arg_zero): test of @sp, @sp 0 and @sp 1 with diverse possibilities for empty lines. 2024-07-02 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert_def_line, _convert): rename $command as $cmdname. 2024-07-02 Patrice Dumas * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/Plaintext.pm: simplify conditions on args. * tp/Texinfo/Convert/Plaintext.pm (process_footnotes): add types to node and anchor element generated for a separate footnote. * tp/Texinfo/Convert/Plaintext.pm (_convert): check if there are args for @link. 2024-07-01 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_parse_line_command_args): remove a useless argument of sprintf. * tp/Texinfo/Convert/DocBook.pm (_convert): handle better @-command defined with definfoenclose missing braces and with 0 args. * tp/Makefile.tres, tp/t/03coverage_braces.t (definfoenclose_bad_argument, definfoenclose_no_braces): new tests. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (_convert): simplify args conditions, use element instead of element contents. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/Text.pm (_convert): set and use $cmdname earlier. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/Text.pm (brace_no_arg_command): rename $command as $command_name. * tp/Texinfo/Convert/Text.pm (_convert): set $cmdname based on $element->{'cmdname'} and use it instead. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/Text.pm (%ignored_types, %ignored_text_types) (_convert): process text elements first. 2024-07-01 Patrice Dumas * tp/Makefile.tres, tp/t/08misc_commands.t (comment_without_line): add test with @comment without argument at the very end of a document. * tp/t/08misc_commands.t (command_not_closed_on_center_line): move to @converted_test_cases. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_convert): use $cmdname instead of $element->{'cmdname'} and $command_name instead of $cmdname. Reindent. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_index_entry): use element instead of contents. * tp/Texinfo/Convert/DocBook.pm (_convert_def_line): remove useless impossible condition. Reindent. * tp/Texinfo/Convert/DocBook.pm (_convert): simplify conditions on args. Use elements instead of contents. Use variables for $substituted_strings. 2024-07-01 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_end_line), tp/Texinfo/XS/parsetexi/end_line.c (end_line): close a bogus brace @-command without argument followed by spaces only, and not by newlinewithout argument followed by spaces only, and not by newline. * tp/Makefile.tres, tp/t/03coverage_braces.t (seeentry_no_braces): test of @seeentry without braces at end of document, on an index entry command line. * tp/Makefile.tres, tp/t/08misc_commands.t (command_not_closed_on_center_line): add test. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_prepare_converted_output_info), tp/Texinfo/Convert/LaTeX.pm (_title_font), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/XS/convert/convert_html.c (convert_titlefont_command): simplify args conditions for titlefont and/or handle titlefont element without braces and with 0 args. * tp/Makefile.tres, tp/t/03coverage_braces.t (titlefont_no_braces): test of @titlefont without braces at end of document. 2024-07-01 Patrice Dumas * tp/Makefile.tres, tp/t/03coverage_braces.t (U_no_braces): test of @U without braces at end of document. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_convert), tp/Texinfo/Convert/HTML.pm (_convert_U_command), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert): reorganize slightly U formatting code, simplify args conditions. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_convert): simplify conditions on element args for @U. Remove error message for empty @U as there is already the same message output un Parser. * tp/t/03coverage_braces.t: add docbook as test_formats for all the tests in @test_cases. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm: simplify conditions on element args. 2024-07-01 Patrice Dumas * tp/Makefile.tres, tp/t/03coverage_braces.t (math_no_braces) (strong_no_braces, caption_no_braces, footnote_no_braces) (hyphenation_no_braces): test of brace commands without braces at end of document. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/Text.pm (_convert): revert a change on explained_commands conversion, if the number of args is >= 2, handle them especially. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/XS/convert/convert_html.c (convert_uref_command), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): handle @url without braces, with 0 args. * tp/Makefile.tres, tp/t/03coverage_braces.t (url_no_braces): test of @url without braces at end of document. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_convert), tp/Texinfo/Convert/LaTeX.pm (_convert): simplify condition for element args. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_exdent_command): handle better exdent with empty argument text. * tp/Texinfo/XS/convert/convert_html.c: minor changes. * tp/Makefile.tres, tp/t/08misc_commands.t (exdent_no_line): add a test with exdent not followed by anything. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/convert/convert_html.c (convert_email_command): handle @email with no brace and 0 args. * tp/Makefile.tres, tp/t/03coverage_braces.t (email_no_braces): test of @email without braces at end of document. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_convert), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert): simplify conditions on element args, convert arg and not arg contents. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert): simplify conditions. * tp/Texinfo/Convert/DocBook.pm (_convert), tp/Texinfo/Convert/HTML.pm (_convert_explained_command), tp/Texinfo/XS/convert/convert_html.c (convert_explained_command): handle bogus 'explanation' commands abbr and acronym without braces, with 0 args, at end of document. * tp/Makefile.tres, tp/t/03coverage_braces.t (abbr_no_braces): test of @abbr without braces at end of document. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): handle @image without brace, with 0 args. * tp/Makefile.tres, tp/t/03coverage_braces.t (image_no_braces): test of @image without braces at end of document. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (_convert): simplify condition. 2024-07-01 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/XS/convert/convert_html.c (convert_xref_commands): handle @*ref command without brace. * tp/Texinfo/ParserNonXS.pm (_handle_comma), tp/Texinfo/XS/parsetexi/separator.c (handle_comma): return @inline* argument container element instead of the command element if the braces have been seen. * tp/Texinfo/ParserNonXS.pm (_close_commands), tp/Texinfo/XS/parsetexi/close.c (close_commands): handle explicitly @-command without brace there when close_commands is called. Should mainly correspond with bogus brace @-command without brace at the end of a document followed by spaces only and no newline. * tp/Texinfo/ParserNonXS.pm (_close_brace_command): print debug message if the basic_inline_commands popped is not the current command. * tp/Makefile.tres, tp/t/03coverage_braces.t (brace_command_no_braces): test of @xref without brace at the end of the document. 2024-07-01 Patrice Dumas * tp/Texinfo/XS/main/command_stack.c, tp/Texinfo/XS/parsetexi/counter.c (print_counter_top): debugging code. 2024-06-30 Patrice Dumas * tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): fix @U argument checking code. * tp/Makefile.tres, tp/t/03coverage_braces.t (command_in_U): add test. 2024-06-30 Patrice Dumas * tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): fix @dotless argument checking code. * tp/Makefile.tres, tp/t/03coverage_braces.t (command_in_dotless): add test. 2024-06-30 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_comma): rename a missed arg_text as arg_text_e. 2024-06-30 Patrice Dumas * tp/Texinfo/XS/parsetexi/macro.c (handle_macro): remove a useless setting of internal_space_holder. Add const. 2024-06-30 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_close_brace), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): reorganize code, add variables, change variable names for clearer code. Remove impossible cases code of args not set, since we are in args. Close command before adding spaces_after_close_brace. * tp/Texinfo/ParserNonXS.pm (_handle_comma), tp/Texinfo/XS/parsetexi/separator.c (handle_comma): rename arg_text as arg_text_e. 2024-06-30 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_comma), tp/Texinfo/XS/parsetexi/separator.c (handle_comma): make code clearer. Decrease remaining_args right after seeing a comma. Use different variables for elements instead or using input current element. Use input current element as the first argument if the comma is is the first seen for a BRACE_inline command. 2024-06-30 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_block_command), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command): reorganize code, change variable names for clearer code, better separation of def* and other block commands, and try to finish modifying an element before registering it as an arg or content. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_element, lookup_extra_element), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info) (remove_associated_copy_info), tp/Texinfo/XS/main/tree_types.h (KEY_PAIR), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace), tp/Texinfo/XS/structuring_transfo/transformations.c (complete_node_menu, complete_tree_nodes_missing_menu): add a new const_element field to the union in KEY_PAIR. Use it for extra_element to make extra_element const. Update build_additional_info, print_associate_info_debug and tree copy code accordingly Cast to remove the const in handle_close_brace as the element is modified to add an extra information, and in complete_node_menu and complete_tree_nodes_missing_menu as the element is modified to have a menu or menu entry inserted. 2024-06-29 Patrice Dumas * tp/Texinfo/Transformations.pm (_prepend_new_menu_in_node_section): set menu parent. * tp/Texinfo/Structuring.pm (new_complete_node_menu), tp/Texinfo/XS/structuring_transfo/structuring.c (new_complete_node_menu): do not set new menu parent, it is better to set it downstream, as in many case there should not be a parent. Add const. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_contents) (lookup_extra_contents), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info, remove_associated_copy_info), tp/Texinfo/XS/main/tree.c (destroy_associated_info): rename extra_load as extra_contents, lookup_extra_load as lookup_extra_contents and add_extra_load as add_extra_contents. Remove the previous lookup_extra_contents and add_extra_contents now that they are not used anymore. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/main/tree.c (remove_from_const_element_list): add. * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command), tp/Texinfo/XS/structuring_transfo/transformations.c (reassociate_to_node, prepend_new_menu_in_node_section) (complete_node_menu, regenerate_master_menu): use extra_load for menus extra information. Remove const by casting in menu generation code since elements are modified when tree is transformed. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_perl_array): rename e as e_l. * tp/Texinfo/XS/main/build_perl_info.c (build_perl_const_element_array, build_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_load, lookup_extra_load), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info) (remove_associated_copy_info), tp/Texinfo/XS/main/tree.c (destroy_associated_info), tp/Texinfo/XS/main/tree_types.h (enum extra_type, KEY_PAIR): add extra_load extra type with CONST_ELEMENT_LIST, add the const_list field in key pair union. Add build_perl_const_element_array to build Perl array from a CONST_ELEMENT_LIST. Add handling of extra_load to print_associate_info_debug, destroy_associated_info and tree copy. Use it for section_childs and authors extra information. Update callers for those extra information keys. 2024-06-29 Patrice Dumas Reindent enum declarations 2024-06-29 Patrice Dumas * tp/Texinfo/XS/main/output_unit.c (units_directions), tp/Texinfo/XS/main/tree_types.h (OUTPUT_UNIT): make OUTPUT_UNIT directions field an array on const output units pointers. Cast to remove the const in units_directions in the cases where the directions are set based on other directions. 2024-06-29 Patrice Dumas * tp/Texinfo/Common.pm (relocate_source_marks): check if source_mark position is defined before comparing with positions, if not it is as if it was 0. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (output_unit_to_perl_hash): move unit_command storing earlier. Return after unit_command storing if the unit_type is external_node_unit since there isn't anything else of interest in such output units. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files), tp/Texinfo/XS/main/build_perl_info.c (output_units_list_to_perl_hash): build external_node_unit Perl hashes especially when they are ready, using a new function output_units_list_to_perl_hash that sets up Perl hashes for output units but do not put the output units in an array. * tp/Texinfo/XS/main/build_perl_info.c (output_unit_to_perl_hash): assume that all the output units in directions have a reference to a Perl object now that external_node_unit are built before directions in other output units are. 2024-06-29 Patrice Dumas Add const. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/structuring.c (get_node_node_childs_from_sectioning): return a CONST_ELEMENT_LIST. Update callers. 2024-06-29 Patrice Dumas * tp/Texinfo/Structuring.pm (complete_node_tree_with_menus), tp/Texinfo/XS/structuring_transfo/structuring.c (complete_node_tree_with_menus): determine the next of Top node with the Top node, but set the prev as the Top node when looking at each node. This avoids setting prev for non-node commands, or for nodes without automatic directions. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/main/tree.c (new_const_element_list) (destroy_const_element_list, reallocate_const_element_list) (add_to_const_element_list), tp/Texinfo/XS/main/tree_types.h (CONST_ELEMENT_LIST): add a list of const ELEMENT *, to be used in cases the elements in the list are not to be modified. * tp/Texinfo/XS/main/document_types.h (DOCUMENT), tp/Texinfo/XS/structuring_transfo/structuring.c (sectioning_structure, complete_node_tree_with_menus, nodes_tree): set document nodes list and sections list to be CONST_ELEMENT_LIST. Use a cast to remove const in complete_node_tree_with_menus where, as an exception to the rule, the node from nodes list is modified. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/structuring.c (sectioning_structure): use only one TEXT for section numbers for all the sections, to reuse memory. 2024-06-29 Patrice Dumas * tp/Texinfo/Structuring.pm (nodes_tree), tp/Texinfo/XS/structuring_transfo/structuring.c (nodes_tree): determine top node section child when processing top node, but set the direction in top node section child when processing the node, as done for other nodes. 2024-06-29 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_perl_directions), tp/Texinfo/XS/main/extra.c (add_extra_directions) (lookup_extra_directions), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info, remove_associated_copy_info), tp/Texinfo/XS/main/tree.c (destroy_associated_info, new_directions), tp/Texinfo/XS/main/tree_types.h (KEY_PAIR): use a simple list for directions in extra info with elements const. The elements are set to const because directions are set after the tree is and, as a rule, the elements should not be modified when accessed from directions. cast to remove the const where the element accessed through directions need to be modified, in build_perl_directions and for tree copying code. Update users/callers. 2024-06-27 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (convert_xref_commands), tp/Texinfo/XS/main/extra.c (lookup_extra_element) (lookup_extra_container), tp/Texinfo/XS/main/manipulate_tree.c (copy_container_contents): separate extra_container from extra_element, by adding a specific function to lookup extra container, lookup_extra_container. Add copy_container_contents to create a new element to be used as extra_container and refer to the contents of another element. Use it to add containers instead of elements. Replace lookup_extra_element by lookup_extra_container for all the callers with extra_container keys. 2024-06-26 Patrice Dumas Add some const 2024-06-26 Patrice Dumas * tp/Texinfo/XS/main/tree_types.h (OUTPUT_UNIT): use a union for unit_command and special_unit_command. 2024-06-26 Patrice Dumas * tp/Texinfo/OutputUnits.pm (output_unit_texi), tp/Texinfo/XS/main/output_unit.c (output_unit_texi): prepend '_EXT_NODE: ' to external node output unit debug string output. * tp/Texinfo/XS/main/output_unit.c (units_directions): use a ELEMENT_STACK for up list instead of an ELEMENT_LIST and reuse is for all the elements. * tp/Texinfo/XS/main/tree_types.h (OUTPUT_UNIT), tp/Texinfo/XS/convert/convert_html.c (from_element_direction) (html_default_format_begin_file), tp/Texinfo/XS/main/build_perl_info.c (output_unit_to_perl_hash), tp/Texinfo/XS/main/output_unit.c (output_unit_texi, label_target_unit_element, split_by_node) (split_by_section): distinguish unit_command for an output unit unit_command found in the tree and special_unit_command for a special output unit unit_command, which is added. Update uses of unit_command. 2024-06-26 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_default_format_contents), tp/Texinfo/XS/main/extra.c (lookup_extra_element) (lookup_extra_element_oot), tp/Texinfo/XS/main/manipulate_indices.c (index_content_element), tp/Texinfo/XS/parsetexi/indices.c (complete_indices): add lookup_extra_element_oot and use it exclusively for extra_element_oot. Modify lookup_extra_element to accept only extra_element and extra_container. 2024-06-26 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_end_line_def_line), tp/Texinfo/XS/parsetexi/end_line.c (end_line_def_line): copy element used as 'def_index_element' extra information, even if it is not translated. 2024-06-26 Patrice Dumas * doc/tp_api/texi2any_internals.texi, doc/tp_api/api_includes/*.texi: add to version control to have reference versions, but also to have something for users who cannot regenerate the files but have access to version control files. 2024-06-26 Patrice Dumas * configure.ac: fix --enable-pod-simple-texinfo-tests help string. * configure.ac: rearrange code. 2024-06-26 Patrice Dumas * tp/Makefile.am (AM_TESTS_ENVIRONMENT), tp/tests/Makefile.am (AM_TESTS_ENVIRONMENT), tp/tests/many_input_files/Makefile.am (AM_TESTS_ENVIRONMENT), Pod-Simple-Texinfo/Makefile.am (AM_TESTS_ENVIRONMENT): do not set builddir (nor buildir) it should not be used anywhere. 2024-06-26 Patrice Dumas * tp/Makefile.am (EXTRA_DIST): remove tp_tests variable. Change in comments. 2024-06-26 Patrice Dumas * tp/prove.sh: remove -I that are not needed with Texinfo::ModulePath anymore. Comments on use of srcdir. 2024-06-26 Patrice Dumas * tp/t/no_structure_test.t, tp/t/same_parser_multiple_files.t, tp/t/test_tree_copy.t, tp/t/test_utils.pl: add fallback for $srcdir based on Texinfo::ModulePath $top_srcdir. 2024-06-26 Patrice Dumas * tp/t/test_utils.pl (test): reset or create output directories early. Set parser errors only once. Do not abort if input file is not found and $document is undef. Skip structuring and conversion with a goto if there is no $document. Skip most of test out file output if there is no $document. Call $document methods in comparisons only if $document is not undef. 2024-06-24 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_close_brace_command) (_handle_close_brace), tp/Texinfo/XS/parsetexi/close.c (close_brace_command), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): pop ct_inlineraw context in close_brace_command instead of handle_close_brace, such that it is done when the command is closed although there is no closing brace. * tp/Makefile.tres, tp/t/16raw.t (inlineraw_not_closed): add test of @inlineraw not closed. * tp/Texinfo/XS/parsetexi/api.c, tp/Texinfo/XS/parsetexi/macro.c: change in FIXMEs. 2024-06-24 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_perl_directions): rename e as e_l, set an ELEMENT called e for more readable code. * tp/Texinfo/XS/main/debug.c (print_associate_info_debug): add extra_index_entry and extra_directions. Minor code improvements. * tp/Texinfo/XS/main/debug.c (print_element_debug_details): access extra_info only if not text element. Minor changes. 2024-06-24 Patrice Dumas * tp/Texinfo/XS/main/convert_to_text.h (TEXT_OPTIONS): use size_t for document_descriptor. * tp/Texinfo/XS/parsetexi/parser.c (parse_texi_document): return void. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/main/DocumentXS.xs, tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/document.c, tp/Texinfo/XS/main/get_perl_info.c, tp/Texinfo/XS/main/translations.c, tp/Texinfo/XS/parsetexi/Parsetexi.xs, tp/Texinfo/XS/parsetexi/api.c, tp/Texinfo/XS/parsetexi/parser.c: use size_t more for document descriptors. 2024-06-24 Patrice Dumas * tp/Texinfo/XS/main/targets.c, tp/Texinfo/XS/parsetexi/labels.c (set_labels_identifiers_target): move set_labels_identifiers_target to labels.c. * tp/Texinfo/XS/main/targets.c: remove destroy_label_list. Add static for functions. * tp/Texinfo/XS/parsetexi/api.c, tp/Texinfo/XS/structuring_transfo/transformations.c: use size_t for document descriptor more. 2024-06-24 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (%leading_space_types, _merge_text) (_abort_empty_line): use a hash for special spaces text types in merge_text and abort_empty_line. * tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/parser.c (merge_text), tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line): add a new TF_leading_space flag, and use it for special spaces text types in merge_text and abort_empty_line. 2024-06-24 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (process_verb_contents): use delimiter_len instead of calling strlen. Use break instead of goto. * tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space): check the debug conditional when there are several debug function calls. Change in comments. 2024-06-24 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (isolate_trailing_spaces_element) (isolate_trailing_space, isolate_last_space): have isolate_trailing_spaces_element return the input element if it consists only of spaces. Use that information to determine that the element text is only space in isolate_last_space and isolate_trailing_space instead of calling strspn. 2024-06-24 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_isolate_trailing_space) (_register_extra_menu_entry_information, _isolate_last_space) (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/menus.c (register_extra_menu_entry_information), tp/Texinfo/XS/parsetexi/parser.c (isolate_trailing_space) (isolate_last_space, process_remaining_on_line): check if there is content and the last content is text in isolate_trailing_space. Call directly isolate_trailing_space in register_extra_menu_entry_information. Remove call of isolate_trailing_space from isolate_last_space. * tp/Texinfo/ParserNonXS.pm (_isolate_trailing_spaces_element) (_isolate_trailing_space, _isolate_last_space), tp/Texinfo/XS/parsetexi/parser.c (isolate_trailing_spaces_element) (isolate_trailing_space, isolate_last_space): split isolate_trailing_spaces_element out of isolate_last_space, and use it in isolate_trailing_space to correctly transfer source marks. Reorganize isolate_last_space code to be more like isolate_trailing_space code, in particular do not check separately that the text ends with spaces. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): call close_container instead of end_paragraph to close a paragraph when directly in the paragraph. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (%close_paragraph_not_preformatted) (_end_paragraph_preformatted, _close_commands) (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/close.c (close_commands), tp/Texinfo/XS/parsetexi/parser.c (end_paragraph_preformatted, process_remaining_on_line): add _end_paragraph_preformatted that closes preofrmatted or paragraph. Use it in close_commands. In process_remaining_on_line, handle especially @-command closing paragraph and not preformatted, and @-command closing both, calling end_paragraph_preformatted in that case. 2024-06-23 Patrice Dumas * doc/texinfo.texi (Customization Variables and Options): put @vindex at beginning of line. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_close_commands), tp/Texinfo/XS/parsetexi/close.c (close_commands): instead of calling end_paragraph and end_preformatted, call close_all_style_commands once and close paragraph or preformatted, depending on the one present. * tp/Texinfo/ParserNonXS.pm (_end_line, _handle_close_brace), tp/Texinfo/XS/parsetexi/end_line.c (end_line), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): call close_container instead of end_paragraph to close a paragraph when directly in the paragraph. * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): remove a useless check of cmd being non-zero. * tp/Texinfo/XS/parsetexi/close.c, tp/Texinfo/XS/parsetexi/parser.c: rename closed_block_command as closed_block_cmd and interrupting_command as interrupting_cmd. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_abort_empty_line), tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line): remove returned status from abort_empty_line. 2024-06-23 Patrice Dumas Stricter check of @-commands not appearing at the beginning of a line * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): check that an @-command is opened at the beginning of a line by checking that the previous element is an empty_line text element. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_in_begin_paragraph), tp/Texinfo/XS/parsetexi/parser.c (in_begin_paragraph): rename begin_paragraph_p as in_begin_paragraph. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_begin_paragraph_p, _begin_paragraph), tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph): add _begin_paragraph_p in Perl code. Do not call begin_paragraph_p in begin_paragraph, instead let the caller call begin_paragraph is begin_paragraph_p returns true. Update callers. * tp/Texinfo/ParserNonXS.pm (_merge_text): rename $last_element_type as $last_elt_type. * tp/Texinfo/ParserNonXS.pm (_merge_text), tp/Texinfo/XS/parsetexi/parser.c (merge_text): instead of calling *abort_empty_line, inline the corresponding code, mixing with paragraph opening, and without the case of last_element text empty, already handled. 2024-06-23 Patrice Dumas * tp/Makefile.tres, tp/t/03coverage_braces.t (footnote_ending_on_empty_line_spaces): test with footnote with end line and spaces after end line before closing brace. * tp/Makefile.tres, tp/t/08misc_commands.t (indent_with_command_after_without_space) (indent_with_text_after_without_space): tests with indent followed by command starting a paragraph or text (through a @value expansion) without space in-between. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_merge_text), tp/Texinfo/XS/parsetexi/parser.c (merge_text): handle especially the case of no last element, as there cannot be paragraph or special text elements handling in that case. * tp/Texinfo/ParserNonXS.pm (_close_current) (_move_last_space_to_element, _abort_empty_line, _end_line), tp/Texinfo/XS/parsetexi/close.c (close_current), tp/Texinfo/XS/parsetexi/end_line.c (end_line), tp/Texinfo/XS/parsetexi/parser.c (move_last_space_to_element) (do_abort_empty_line): separate code moving a last space children as info spaces_before_argument in element out of abort_empty_line to move_last_space_to_element, and call directly move_last_space_to_element when relevant. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_abort_empty_line): define more variables and add separate if. * tp/Texinfo/ParserNonXS.pm (_merge_text, _abort_empty_line) (_end_line, _handle_open_brace), tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/end_line.c (end_line, do_abort_empty_line) (merge_text, abort_empty_line), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): add a new internal text type, internal_spaces_before_context_argument, for context brace commands only, otherwise very similar with internal_spaces_before_argument. 2024-06-23 Patrice Dumas * tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents) (find_root_command_next_heading_command): fix type_data text flag symbol. 2024-06-23 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_parse_texi): call _pop_context at the end of document parsing. * tp/Texinfo/XS/parsetexi/parser.c (parse_texi): check that the context popped at the end of the document is base or line. * tp/Texinfo/ParserNonXS.pm: do not call _pop_context with an object oriented syntax. 2024-06-22 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal): types not known in Perl cannot be set to ignored as types in Perl, so consider only their ignored status as commands. 2024-06-22 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%default_commands_conversion): ignore explicitly seealso, seeentry and sortas. 2024-06-22 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_abort_empty_line), tp/Texinfo/XS/parsetexi/parser.c (do_abort_empty_line): simplify debug message. Changes in comments. 2024-09-29 Patrice Dumas Update/fix test result 2024-06-22 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (%type_without_paragraph), tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph_p): remove explicit check for root_line as non-paragraph type, as it is in ct_line context now. 2024-06-22 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_current_context_command): rename _top_context_command as _current_context_command to match C code. * tp/Texinfo/ParserNonXS.pm (%parsing_state_initialization) (_initialize_parsing, parse_texi_piece, parse_texi_line) (parse_texi_text, parse_texi_file, _parse_texi), tp/Texinfo/XS/parsetexi/api.c (initialize_parsing, parse_file) (parse_text, parse_string, parse_piece), tp/Texinfo/XS/parsetexi/context_stack.c (current_context_command) (top_context_command, current_context), tp/Texinfo/XS/parsetexi/parser.c (parse_texi): add the root context as argument to initialize_parsing. Set root context to ct_line if in parse_texi_line, and to ct_base otherwise. Modify C code to have an explicit root context. * tp/Texinfo/ParserNonXS.pm (_current_context_command) (_end_line, _handle_other_command, _process_remaining_on_line), tp/Texinfo/XS/parsetexi/end_line.c (end_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command) (process_remaining_on_line): verify that the top context command is defined when checking that we are in line context on a command line argument. * tp/Texinfo/XS/parsetexi/context_stack.c: remove in_context. 2024-06-22 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (text_contents_to_plain_text): use text_append_n in ADD, as we always know the text length. 2024-06-22 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (text_contents_to_plain_text): do not check that the element is not NULL, it should never happen. 2024-06-22 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (is_end_current_command): remove end_cmd argument is it is always set to the cmd argument. Update callers. 2024-06-22 Patrice Dumas * tp/Texinfo/ParserNonXS.pm, tp/Texinfo/XS/parsetexi/parser.c (macro_block_stack, macro_block_number, macro_block_space) (push_macro_block_stack, pop_macro_block_stack) (macro_block_stack_top): rename raw_block_stack as macro_block_stack, other raw_block_* variables as macro_block_*, push_raw_block_stack as push_macro_block_stack, pop_raw_block_stack as pop_macro_block_stack and raw_block_stack_top as macro_block_stack_top. Update callers. 2024-06-22 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_macro_block_contents) (_parse_tex), tp/Texinfo/XS/parsetexi/parser.c (process_macro_block_contents, parse_texi): emit errors on unclosed raw block commands (except for the first level) in process_macro_block_contents if the block is not finished instead of checking at the end of the parsing. 2024-06-22 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line, _parse_texi), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line) (parse_texi): process a definition line continuation right where it is seen. Get the next line immediately too. 2024-06-21 Patrice Dumas * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command): minor changes. avoid setting current twice. use else if for conditions that are exclusive instead of series of if. * tp/Texinfo/ParserNonXS.pm (_handle_block_command): update to be more like C code. 2024-06-21 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_block_command) (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): remove the code related to @*macro from handle_block_command and put it directly in process_remaining_on_line. 2024-06-21 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (process_macro_block_contents) (process_raw_block_contents) (process_ignored_raw_format_block_contents) (process_remaining_on_line): free and set allocated_text in functions, as soon as next_line is called. Pass line as out parameter by reference. 2024-06-21 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line, _parse_texi), tp/Texinfo/XS/parsetexi/parser.c (process_verb_contents) (process_remaining_on_line, parse_texi): process verb contents right after brace opening. Do it in the process_verb_contents function in C. 2024-06-21 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_prepare_units_directions_files), tp/Texinfo/XS/main/converter_types.h (enum output_units_descriptor_type, CONVERTER), tp/Texinfo/XS/main/output_unit.c (label_target_unit_element) (units_directions): create an output unit list in html_prepare_units_directions_files to register external nodes special output units created in label_target_unit_element. This is such that the output units can be freed when the document is destroyed. 2024-06-21 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/structuring.c (number_floats): do not use a static TEXT variable, instead initialize the TEXT variable at the beginning of the function and reuse the storage. The function should only be called once per document. 2024-06-21 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (process_ignored_raw_format_block_contents): use next_text instead of next_line to get a new line within contents. * tp/Texinfo/XS/parsetexi/parser.c (process_macro_block_contents) (process_raw_block_contents) (process_ignored_raw_format_block_contents): free the line returned by next_text. free and reallocate the line when the line is returned without leading spaces. * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): free allocated before storing and store the lines returned by process_*_block_contents functions in allocated_text to avoid memory leaks. 2024-06-21 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_raw_block_contents): fix detection of @end to gather the whole command name. * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line) (_parse_texi), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line, parse_texi): use process_raw_block_contents to process ignored conditional block commands. 2024-06-21 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_raw_block_contents) (_process_macro_block_contents, _process_remaining_on_line), tp/Texinfo/XS/parsetexi/parser.c (process_macro_block_contents) (process_raw_block_contents, process_remaining_on_line): create process_macro_block_contents out of process_raw_block_contents for macro specific code. Change C code to separate better determination of nested command beginning and detection of @end line. 2024-06-21 Patrice Dumas * tp/t/55conditionals.t (value_on_ifset): add test with @value on @ifset line. 2024-06-20 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_ignored_raw_format_block_contents) (_process_remaining_on_line), tp/Texinfo/XS/parsetexi/parser.c (process_ignored_raw_format_block_contents) (process_remaining_on_line): add process_ignored_raw_format_block_contents to process contents of an ignored raw format block command until the @end line. Call it after a command line to catch raw format block command with a comment on the line. * tp/Makefile.tres, tp/t/16raw.t (comments_on_raw_block_line): test with comments on raw format block command lines with contents, with an expanded format and an ignored format. 2024-06-20 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_raw_block_contents) (_process_remaining_on_line, _parse_texi), tp/Texinfo/XS/parsetexi/parser.c (process_raw_block_contents) (process_remaining_on_line, parse_texi): add process_raw_block_contents to process a raw block command contents until @end line. Use it right after the block command opening. 2024-06-20 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line, _parse_texi), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line) (parse_texi): handle ignored format raw command right after end_line call, by calling next_text within process_remaining_on_line and processing until @end instead of returning. @end is then processed by the next call of process_remaining_on_line without going through the parse_texi lines loop. 2024-06-20 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line, _parse_texi), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line) (parse_texi): no need to check explicitly that a fprmat raw block command is ignored, as if directly in the command it is necessarily ignored, otherwise there would be a rawpreformatted container. * tp/Makefile.tres, tp/t/16raw.t (empty_line_in_command_in_expanded_not_expanded): add test of empty line in brace commands in raw format blocks. 2024-06-20 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_end_line, _parse_texi), tp/Texinfo/XS/parsetexi/end_line.c (end_line, parse_texi): call abort_empty_line for an internal_spaces_before_argument at end of line in end_line and not in parse_texi. 2024-06-20 Patrice Dumas * tp/Texinfo/Structuring.pm (set_menus_node_directions): handle undef FORMAT_MENU. 2024-06-20 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (%parsing_state_initialization) (%begin_paragraph_contexts, _pop_context, _end_line) (_get_context_stack, _handle_open_brace, _parse_texi), tp/Texinfo/XS/parsetexi/close.c (close_brace_command), tp/Texinfo/XS/parsetexi/context_stack.c (current_context) (is_context_empty), tp/Texinfo/XS/parsetexi/context_stack.h (begin_paragraph_context, enum context), tp/Texinfo/XS/parsetexi/end_line.c (end_line), tp/Texinfo/XS/parsetexi/parser.c (parse_texi), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): do not differentiate base context and ct_brace_command. Rename ct_NONE as ct_base and push ct_base instead of ct_brace_command when opening a context brace command (that do not start math context). Add is_context_empty in C to determine that the context is empty since the base context can now appear in the context stack and modify similarly Perl code. 2024-06-20 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_parse_texi), tp/Texinfo/XS/parsetexi/parser.c (parse_texi): do not abort an empty line which is not an empty string at the end of the document. 2024-06-19 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_menu_entry_separators), tp/Texinfo/XS/parsetexi/menus.c (handle_menu_entry_separators): reuse the empty_line as the internal_menu_star element. Setup last_element at the beginning of the function. 2024-06-19 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (%parsing_state_initialization): call toplevel context ct_NONE as in C. * tp/Texinfo/ParserNonXS.pm (_close_container): add source_info argument to _close_container, update callers. * tp/Texinfo/ParserNonXS.pm: remove unused _remove_empty_arg. * tp/Texinfo/ParserNonXS.pm (_handle_macro), tp/Texinfo/XS/parsetexi/macro.c (handle_macro): do not call _merge_text, setup more simply the macro_call_element contents when a macro is called with the whole line as argument. * tp/Texinfo/ParserNonXS.pm (%type_without_paragraph) (%begin_paragraph_contexts, _begin_paragraph, _close_container) (_abort_empty_line, _end_line), tp/Texinfo/XS/parsetexi/close.c (close_container), tp/Texinfo/XS/parsetexi/context_stack.h (begin_paragraph_context, enum context), tp/Texinfo/XS/parsetexi/end_line.c (end_line), tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph_p, begin_paragraph): add paragraph in context. Change the logic of determination of paragraph beginning and treatment of empty lines at end of line. * tp/Makefile.tres, tp/t/50value.t (unknown_value_after_spaces): add test with unknown @value after spaces on a line and not in a paragraph. 2024-06-18 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): simplify code related to deprecated commands, make it more like Perl. 2024-06-17 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_merge_text): also use _transfer_source_marks when merging with existing $last_element. 2024-06-17 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (merge_text): no need to retrieve the last element with empty_line anymore, as it is not removed in do_abort_empty_line anymore, as the case of empty text is handled before. * tp/Texinfo/ParserNonXS.pm (_merge_text): update to match C code. 2024-06-17 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_merge_text), tp/Texinfo/XS/parsetexi/parser.c (merge_text): if a special space text element is empty and there is non space text merged, reuse the element as a normal text element. This is different from before if there are source marks as now they are kept as is, previously, a call to *_abort_empty_line followed by adding a new element led to an empty text element added to store the source marks. 2024-06-17 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (merge_text), tp/Texinfo/XS/parsetexi/source_marks.c (transfer_source_marks): add an added length argument to transfer_source_marks, to use the function in merge_text when merging with existing text. Update transfer_source_marks callers. 2024-06-17 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line): call with a pointer on element, not a pointer on pointer. Update callers. * tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line) (do_abort_empty_line, merge_text): move do_abort_empty_line out of abort_empty_line and call it directly in merge_text instead of redoing the same check of elements again in abort_empty_line. Change merge_text code to be simpler. 2024-06-17 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (merge_text): modify code to have the new_text label before a statement and not a declaration. * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): comment out unused value_valid label. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/main/output_unit.c (destroy_output_unit): destroy the unit_command if the output_unit is a special_unit_variety as in that case the element is not in the main document Texinfo tree and will not be freed. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/main/output_unit.c (retrieve_output_units) (new_output_units_descriptor): rename output_units variable as output_units_lists. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/main/document.c (destroy_document_information_except_tree), tp/Texinfo/XS/main/output_unit.c (destroy_output_unit) (free_output_unit_list, free_output_units_lists): free output units. 2024-06-16 Patrice Dumas Associate output units lists with document in XS * tp/Texinfo/Convert/Plaintext.pm (output), tp/Texinfo/OutputUnits.pm (rebuild_output_units), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units, html_prepare_units_directions_files) (html_prepare_output_units_global_targets), tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element), tp/Texinfo/XS/convert/convert_html.c (prepare_special_units) (set_special_units_targets_files) (prepare_associated_special_units_targets) (html_internal_command_href, html_prepare_output_units_global_targets) (html_prepare_units_directions_files, html_convert_convert) (html_prepare_title_titlepage, html_convert_output), tp/Texinfo/XS/main/build_perl_info.c (fill_output_units_descriptor_av) (build_output_units_list, setup_output_units_handler) (rebuild_output_units_list), tp/Texinfo/XS/main/document_types.h (OUTPUT_UNIT_LISTS, DOCUMENT), tp/Texinfo/XS/main/get_perl_info.c (get_sv_output_units), tp/Texinfo/XS/main/output_unit.c (retrieve_output_units, new_output_units_descriptor, split_by_node) (split_by_section), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (split_by_node, split_by_section, rebuild_output_units, split_pages), tp/t/test_utils.pl (test): add output_units_lists in DOCUMENT, and put and retrieve output units from there. Remove output_units_list, output_units_number and output_units_space in output_unit.c. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info): use the newly initialized string list instead of allocating another one. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/main/command_stack.c (command_is_in_referred_command_stack): add braces for better code readability. * tp/Texinfo/XS/main/convert_utils.c (encoded_input_file_name) (encoded_output_file_name): simpler conditions. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (xml_numeric_entity_accent): remove condition on cmd being an accent command, there is no specific reason to test it especially. Rearrange code. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): use data_cmd instead of element->e.c->cmd more. * tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): use more flags and command data in conditions and rearrange. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/transformations.c (move_index_entries_after_items): fix condition. 2024-06-16 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/transformations.c (protect_first_parenthesis_in_targets_internal): check that the element is an @-command element before calling get_label_element. 2024-09-29 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_command_description): update for move of cmd to CONTAINER. 2024-06-16 Patrice Dumas Turn source_mark_list to a pointer * tp/Texinfo/XS/main/tree_types.h (ELEMENT), tp/Texinfo/XS/main/build_perl_info.c (store_source_mark_list), tp/Texinfo/XS/main/manipulate_tree.c (add_source_mark) (relocate_source_marks, parse_node_manual, modify_tree, protect_text), tp/Texinfo/XS/main/tree.c (free_element_source_mark_list) (destroy_element_empty_source_mark_list, destroy_element), tp/Texinfo/XS/parsetexi/close.c (close_container) (close_command_cleanup), tp/Texinfo/XS/parsetexi/def.c (split_delimiters, split_def_args), tp/Texinfo/XS/parsetexi/parser.c (merge_text, abort_empty_line, isolate_last_space_internal), tp/Texinfo/XS/parsetexi/source_marks.c (transfer_source_marks), tp/Texinfo/XS/structuring_transfo/transformations.c (protect_first_parenthesis) (protect_hashchar_at_line_beginning_internal): turn the source_mark_list field of ELEMENT to a pointer. Add free_element_source_mark_list and destroy_element_empty_source_mark_list. 2024-06-15 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_close_command_cleanup): separate multitable head and body only if the multitable has contents. * tp/Texinfo/ParserNonXS.pm (_close_command_cleanup), tp/Texinfo/XS/parsetexi/close.c (close_command_cleanup): update code taking into account that i) there cannot be ignorable_spaces_after_command before before_item, as it is added only after commands, and inside commands arguments. ii) there cannot be an @end in before_item, as soon as an @end is seen it is popped from the element it is in, before closing. iii) there can only be before_item or elements associated with @*item directly in block item at commands. * tp/Texinfo/XS/parsetexi/utils.c (item_line_parent): use explicit command enums. * tp/Texinfo/XS/main/convert_utils.c (find_root_command_next_heading_command): fix condition. * tp/Texinfo/ParserNonXS.pm (_expand_macro_arguments): fix condition. * tp/Texinfo/Document.pm (new_document): do not initialize explicitly 'included_files' to give the same output as with XS. * tp/Texinfo/XS/main/manipulate_indices.c (idx_leading_text_or_command), tp/Texinfo/Indices.pm (_idx_leading_text_or_command), tp/Texinfo/XS/main/utils.c (is_content_empty), tp/Texinfo/Common.pm (is_content_empty): handle text element first. * tp/Texinfo/XS/main/node_name_normalization.c (convert_to_normalized_internal), tp/Texinfo/Convert/NodeNameNormalization.pm (%ignored_text_types) (_convert): handle text first, including ignored text types, and the remaining elements afterwards. * tp/Texinfo/Translations.pm (_substitute_element_array), tp/Texinfo/XS/main/translations.c (substitute_element_array): check for text first, as there is no recursion in that case. * tp/Texinfo/XS/main/tree_types.h (CONTAINER, ELEMENT), tp/Texinfo/XS/main/tree.c (new_command_element), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/parsetexi/indices.c (set_non_ignored_space_in_index_before_command): move cmd from ELEMENT to CONTAINER, as text element do not have a command name. Update users, making sure in particular that element_command_name, element_builtin_cmd, element_builtin_data_cmd and similar functions and macros are never called for a text element. * tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): rename command variable as cmd. * tp/t/test_document.t: fix the calls to is(). * tp/Makefile.tres, tp/t/05paragraph.t (indent_before_macro_definition_and_other): add test with command that are skipped between @indent and the next paragraph. 2024-06-13 Patrice Dumas * tp/Texinfo/XS/main/tree_types.h (KEY_PAIR), tp/Texinfo/XS/main/extra.c (get_associated_info_key), tp/Texinfo/XS/parsetexi/end_line.c, tp/Texinfo/XS/structuring_transfo/transformations.c: remove the skey field of KEY_PAIR, now that it is not used anywhere anymore. 2024-06-12 Patrice Dumas * tp/Texinfo/XS/main/DocumentXS.xs (set_document_global_info), tp/Texinfo/XS/main/build_perl_info.c (build_global_info), tp/Texinfo/XS/main/document.c (add_other_global_info_string), tp/Texinfo/XS/main/document_types.h (KEY_STRING_PAIR) (OTHER_GLOBAL_INFO, GLOBAL_INFO): do not use ASSOCIATED_INFO for global_info.other_info, use specific structures and add_other_global_info_string to add a key, string pair. * tp/Texinfo/XS/main/extra.c: remove get_associated_info_skey and add_associated_info_string_dup. * tp/Makefile.tres, t/test_document.t: add test of Texinfo::Document set_document_global_info. 2024-09-29 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_command_description): use integer key lookup_extra_element. 2024-06-12 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_misc_args) (add_extra_index_entry, lookup_extra_misc_args) (lookup_extra_index_entry), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info): use an integer key for extra_misc_args and extra_index_entry. Remove lookup_associated_sinfo and lookup_extras. Update callers. 2024-06-12 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/extra.c (add_extra_contents, add_extra_directions) (lookup_extra_contents, lookup_extra_directions), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info), tp/Texinfo/XS/structuring_transfo/structuring.c (direction_bases) (section_direction_associated_node): use an integer key for extra_contents and extra_directions. Update callers. 2024-06-12 Patrice Dumas * tp/Texinfo/XS/main/utils.c (delete_global_info): use the pointer directly. * tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_string, add_extra_string_dup) (lookup_extra_string), tp/Texinfo/XS/main/build_perl_info.c (build_additional_info): use an integer key for extra_string. Update callers. 2024-06-12 Patrice Dumas * tp/Texinfo/XS/main/debug.c (print_associate_info_debug): update for change in misc_args. * tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_element, add_extra_element_oot) (add_extra_container, lookup_extra_element, lookup_extra) (lookup_extras): use an integer key for extra_element, extra_element_oot and extra_container. Update callers. 2024-06-12 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_register_file_information): really use the string stored in small_strings. 2024-06-12 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (add_associated_file_info_integer, html_register_file_information) (lookup_associated_file_info, html_get_file_information) (html_set_pages_files, setup_output_simple_page) (html_conversion_finalization), tp/Texinfo/XS/main/converter_types.h (FILE_INFO_KEY_PAIR, FILE_ASSOCIATED_INFO, FILE_ASSOCIATED_INFO_LIST) (CONVERTER), tp/Texinfo/XS/main/extra.c: add a specific structure for information associated to a file instead of using the generic ASSOCIATED_INFO structures. Remove add_associated_info_integer. * tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (get_associated_info_skey) (get_associated_info_key, lookup_associated_info) (lookup_associated_sinfo, add_extra_integer, lookup_extra_by_index) (lookup_extra_integer), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info), tp/Texinfo/XS/main/tree.c (ai_key_names), tp/Texinfo/XS/main/tree_types.h (AI_KEYS_LIST), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/structuring_transfo/transformations.c (reassociate_to_node): use an integer key for extra info integer. Duplicate some functions to still use string as key for other extra types. Update callers. 2024-06-12 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_register_file_information): make sure that the key is saved on the heap by adding to converter small_strings. 2024-06-12 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_line_command), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command): rename extra key level as subentry_level. 2024-06-11 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_gather_def_item, _end_line_misc_line) (_end_line_starting_block, _end_line, _handle_line_command) (_handle_block_command, _handle_open_brace), tp/Texinfo/XS/main/tree_types.h, tp/Texinfo/XS/parsetexi/def.c (gather_def_item), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block, end_line_misc_line, end_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command) (handle_block_command), tp/Texinfo/XS/parsetexi/parser.c (check_valid_nesting), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace), tp/Texinfo/XS/structuring_transfo/transformations.c (reassociate_to_node): do not set def_line as type for @def*x and @def*line. Use extra def_command to determine that an element is either a @def* line command or a def_line type in Perl. Set and use EF_def_line flag to determine that an element is either a @def* line command or a def_line type in C. * tp/Texinfo/Convert/DocBook.pm (%docbook_line_commands) (_convert_def_line, _convert), tp/Texinfo/Convert/HTML.pm (default_type_conversion), tp/Texinfo/Convert/LaTeX.pm (%def_line_commands, _convert_def_line, _convert), tp/Texinfo/Convert/Plaintext.pm (_convert_def_line, _convert), tp/Texinfo/Convert/TexinfoMarkup.pm (%line_commands) (_convert_def_line, _convert), tp/Texinfo/Convert/Text.pm (%converted_formattable_line_commands, _convert_def_line) (_convert), tp/Texinfo/Convert/TextContent.pm (%formatted_line_commands, converter_initialize), tp/Texinfo/XS/convert/convert_html.c (convert_def_command), tp/Texinfo/XS/main/convert_to_text.c (convert_def_line) (convert_to_text_internal), : convert @def* line command in addition to def_line type. 2024-06-10 Patrice Dumas Use a string list for extra_misc_args * tp/Texinfo/XS/convert/convert_html.c (convert_sp_command) (convert_tab_command, convert_printindex_command), tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/main/extra.c (add_extra_misc_args) (lookup_extra_misc_args), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info), tp/Texinfo/XS/main/tree.c (destroy_associated_info), tp/Texinfo/XS/main/utils.c (informative_command_value), tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args, end_line_starting_block) (end_line_misc_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command): use a STRING_LIST for extra_misc_args. 2024-06-10 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command), tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/extra.c (add_extra_index_entry) (lookup_extra_index_entry), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info), tp/Texinfo/XS/main/tree.c (destroy_associated_info), tp/Texinfo/XS/main/tree_types.h (INDEX_ENTRY_LOCATION, KEY_PAIR, enum extra_type), tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry), tp/Texinfo/XS/structuring_transfo/transformations.c (lookup_index_entry, relate_index_entries_to_table_items_in): add extra_index_entry extra type that represents the location of an index entry, with index name and number in index. Use it instead of misc_args for index entries. 2024-06-10 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): nest conditions to avoid calling the conditions on setting Perl data for all the elements. 2024-06-10 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (store_info_element): check if element to store is 0 in store_info_element. Update callers. 2024-06-10 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (store_additional_info) (store_info_integer, element_to_perl_hash): add store_info_integer. Modify store_additional_info to take a reference on a hv in argument and not a number. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_contents) (convert_style_command, convert_menu_entry_type) (convert_def_line_type), tp/Texinfo/XS/convert/converter.c (table_item_content_tree), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/targets.c (set_labels_identifiers_target, add_element_to_identifiers_target), tp/Texinfo/XS/main/tree_types.h (ELEMENT), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command) (handle_block_command, handle_brace_command), tp/Texinfo/XS/parsetexi/macro.c (parse_macro_command_line), tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph) (register_command_as_argument, process_remaining_on_line), tp/Texinfo/XS/structuring_transfo/structuring.c (check_nodes_are_referenced, complete_node_tree_with_menus, nodes_tree) (new_node_menu_entry), tp/Texinfo/XS/structuring_transfo/transformations.c (insert_nodes_for_sectioning_commands): set un flags extra code, isindex, is_target, omit_def_name_space, not_after_command, invalid_syntax, command_as_argument_kbd_code, indent, noindent. 2024-06-10 Patrice Dumas * tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents): use a static ELEMENT_LIST for arguments and copy in the end. * tp/Texinfo/Convert/Utils.pm (find_innermost_accent_contents), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents): check text first as accent argument and rearrange code. * tp/Texinfo/XS/main/convert_utils.c (find_root_command_next_heading_command): check text first. 2024-06-09 Patrice Dumas * tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/main/types_data.h: add at_command flag. * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): do text element more separately from other elements. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): use flag for condition that select types only if needed in Perl. * tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): use types to separate classes of ignored commands. * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_brace_command): put BRACE_inline in ET_brace_args_command. 2024-06-09 Patrice Dumas * tp/Texinfo/XS/parsetexi/counter.c (counter_element_value): add. * tp/Texinfo/XS/parsetexi/macro.c (argument_brace_groups) (expand_linemacro_arguments): use an COUNTER counter instead of a counter in element, there are few elements, there is no issue with linear searching in the counter. * tp/Texinfo/XS/main/tree_types.h (ELEMENT): remove counter. 2024-06-09 Patrice Dumas * tp/Texinfo/ManipulateTree.pm (_copy_tree): modify code to take into acocunt that there is no command name in text and be more similar with C code. 2024-06-09 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/transformations.c (reassociate_to_node): select elements with "element_node" before accessing it. * tp/Texinfo/XS/main/tree_types.h (CONTAINER, ELEMENT): move ASSOCIATED_INFO extra_info to CONTAINER now that it is never used by text elements. Update code accessing this field. 2024-06-09 Patrice Dumas * tp/Texinfo/ManipulateTree.pm (_copy_tree) (_remove_element_copy_info): update to be like the C implementation. Rename _copy_extra_info as _remove_element_copy_info. 2024-06-09 Patrice Dumas * tp/t/test_tree_copy.t ($tref): do have mix text elements with extra/contents, as it is not a valid tree, make them containers. 2024-06-09 Patrice Dumas * tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info) (associate_info_references): move string, integer and misc_arg copying to copy_associated_info. * tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal) (copy_associated_info, get_copy_ref): directly copy an element that has not been copied before and is seen in the tree. Remove copy_tree_internal. No need for counter anymore as all the elements are copied when needed. Remove increase_ref_counter. * tp/Texinfo/XS/main/manipulate_tree.c (remove_associated_copy_info) (remove_element_copy_info): since there are no reference to resolve anymore in the second step, it is now only used to remove the reference to the copy element in each element in the copied tree. Rename associate_info_references as remove_associated_copy_info and copy_extra_info as remove_element_copy_info. 2024-06-09 Patrice Dumas * tp/Texinfo/XS/main/manipulate_tree.c (copy_extra_info): remove 'new' argument as it can always be obtained from the element being copied. 2024-06-09 Patrice Dumas * tp/Texinfo/XS/main/manipulate_tree.c (copy_element) (copy_associated_info, copy_tree_internal, associate_info_references) (copy_extra_info): use the element flags to mark that the copy of an element was done, and put the pointer to the copy in the element elt_info after the usual information. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/tree_types.h (ELEMENT): add a counter in element. * tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal) (get_copy_ref, associate_info_references): use element counter instead of "_counter" extra information. * tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments): use the element counter to count the top level matching braces. Remove set_toplevel_braces_nr and count_toplevel_braces. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (setup_info_hv) (store_info_element, store_info_string, element_to_perl_hash): add setup_info_hv that only sets up the info hash in the Perl element. Remove store_info_sv and call hv_store in the functions that called store_info_sv before. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (store_info_sv) (store_info_element, store_info_string, element_to_perl_hash): pass directly a pointer on an HV * instead of a number of info added. 2024-06-08 Patrice Dumas Remove info_info ASSOCIATED_INFO from CONTAINER * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/debug.c (print_element_debug_details), tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal) (copy_extra_info), tp/Texinfo/XS/main/tree.c (destroy_element), tp/Texinfo/XS/main/tree_types.h (CONTAINER), tp/Texinfo/XS/parsetexi/close.c (is_container_empty): remove completely the info_info ASSOCIATED_INFO information from CONTAINER in ELEMENT now that everything is in other data structures, mainly elt_info and string_info. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/extra.c: remove add_info_string, add_info_string_dup, lookup_info and lookup_info_string. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal): fix a condition. * tp/Texinfo/XS/main/build_perl_info.c (store_info_sv) (store_info_element, store_info_string): split store_info_sv out of store_info_element and add store_info_string to strore string in info. * tp/Texinfo/XS/convert/converter.c (table_item_content_tree), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/builtin_commands.c (element_command_name), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi), tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal), tp/Texinfo/XS/main/tree.c (new_element, new_command_element) (destroy_element), tp/Texinfo/XS/parsetexi/close.c (close_brace_command), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command, handle_brace_command), tp/Texinfo/XS/parsetexi/macro.c (parse_macro_command_line) (handle_macro), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): remove "delimiter", "alias_of" and "command_name" info string from the info structure and add them to the string_info array. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/parsetexi/handle_commands.c (parse_rawline_command) (handle_line_command): return an ELEMENT_LIST from parse_rawline_command. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/parsetexi/handle_commands.c (parse_rawline_command) (handle_line_command): set rawline command text type to ET_rawline_arg directly in parse_rawline_command. * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command): create a raw line command only if not ignored. * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command): set ET_def_line type early, when calling new_element. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/parsetexi/def.c (gather_def_item): check first if there is content for a def item before creating the element. 2024-06-08 Patrice Dumas * tp/Texinfo/Convert/DocBook.pm (%container_ignored_if_empty) (_convert), tp/Texinfo/Convert/LaTeX.pm (%container_ignored_if_empty) (_convert), tp/Texinfo/Convert/TexinfoMarkup.pm (%container_ignored_if_empty, _convert): ignore explicitly some empty containers instead of relying on the tree to be without those empty containers. * tp/Texinfo/ParserNonXS.pm (_close_container), tp/Texinfo/XS/parsetexi/close.c (close_container): keep the original element type when an element is kept for the source marks. * tp/Texinfo/XS/convert/converter.c (table_item_content_tree): do not reset the type it is already set. * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line): set ET_index_entry_command type when creating the element. 2024-09-29 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_command_description), tp/Texinfo/XS/structuring_transfo/structuring.c (new_node_menu_entry): use the union e name. 2024-06-08 Patrice Dumas Do not use unnamed union for ELEMENT * tp/Texinfo/XS/main/tree_types.h (ELEMENT): rename the union as e. Update codes using the corresponding union fields. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/main/types_data.h: add macro_call type flag. * tp/Texinfo/XS/main/tree_types.h (CONTAINER): move string_info to CONTAINER. * tp/Texinfo/XS/main/tree_types.h (enum string_info_type): add sit_command_name. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal), tp/Texinfo/XS/structuring_transfo/transformations.c (correct_level) (protect_hashchar_at_line_beginning_internal): use new_command_element to create a new command element. Set correctly types of new command elements. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (is_end_current_command): pass directly an enum command_id as argument. Update callers. * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): remove top_stack_raw_element. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (new_command_element_added) (table_item_content_tree): add new_command_element_added and use it in table_item_content_tree. 2024-06-08 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_brace_command), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_brace_command): have definfoenclose always takes precedence. Rearrange code. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/extra.c: remove add_info_element_oot, add_info_integer, lookup_info_integer and lookup_info_element. 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/tree.c (destroy_element_and_children): fix condition (found with valgrind). 2024-06-08 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/convert_to_texinfo.c (convert_to_texinfo_internal), tp/Texinfo/XS/main/tree_types.h (enum elt_info_type), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command), tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space_internal), tp/Texinfo/XS/structuring_transfo/structuring.c (new_block_command), tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning, new_node): put spaces_after_argument in elt_info. 2024-06-07 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_macro), tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/macro.c (handle_macro): set macro_call_line or rmacro_call_line as type for macro call argument when there are no braces and the whole line is the argument. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi) (convert_to_texinfo_internal), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command), tp/Texinfo/XS/parsetexi/macro.c (expand_macro_arguments) (expand_linemacro_arguments), tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line), tp/Texinfo/XS/structuring_transfo/structuring.c (new_block_command), tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning, new_node): put spaces_before_argument in elt_info. 2024-06-07 Patrice Dumas * tp/Texinfo/XS/main/element_types.awk, tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/main/tree_types.h (enum elt_info_type), tp/Texinfo/XS/main/types_data.h: add spaces_before and spaces_after flags. Rearrange indices of element in elt_info. * tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning): add the correct types to the created command elements. * tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi) (convert_to_texinfo_internal): expand spaces_before_argument only in elements which can have the info. 2024-06-07 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_expand_macro_arguments), tp/Texinfo/XS/parsetexi/macro.c (expand_macro_arguments): associate spaces_before_argument with brace argument, not with command call. * tp/Texinfo/ParserNonXS.pm (_expand_linemacro_arguments), tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments): set argument type to line_arg. Put first spaces_before_argument in linemacro_call, similar to other line commands. 2024-06-07 Patrice Dumas * tp/Texinfo/XS/main/element_types.awk, tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/main/tree_types.h: add braces type flag, use it in element_types.awk. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi), tp/Texinfo/XS/parsetexi/macro.c (handle_macro), tp/Texinfo/XS/parsetexi/parser.c (gather_spaces_after_cmd_before_arg) (new_value_element): put spaces_after_cmd_before_arg in elt_info instead of info. 2024-06-07 Patrice Dumas * tp/Texinfo/XS/main/element_types.awk: block_line_arg and line_arg hold spaces_after_cmd_before_arg and comment_at_end, not the commands. * tp/Texinfo/XS/main/build_perl_info.c (store_info_element) (element_to_perl_hash), tp/Texinfo/XS/main/convert_to_texinfo.c (convert_to_texinfo_internal), tp/Texinfo/XS/main/manipulate_tree.c (copy_element, copy_associated_info, copy_tree_internal) (copy_extra_info), tp/Texinfo/XS/main/tree.c (new_element) (destroy_element), tp/Texinfo/XS/main/tree_types.h (enum elt_info_type), tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space), tp/Texinfo/XS/structuring_transfo/transformations.c (new_node): initialize, free, copy elt_info list of elements meant to replace the elements in info. Put comment_at_end in that list instead of in the info structure and pass it to Perl. * tp/Texinfo/XS/main/tree_types.h (enum string_info_type, ELEMENT): prepare string information in element to replace information in info. 2024-06-05 Patrice Dumas * tp/Texinfo/XS/main/tree.c (destroy_associated_info): use k_pair variable. 2024-06-05 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_brace_command): add brace_args_command type for BRACE_arguments in C. * tp/Texinfo/XS/main/builtin_commands.h (COMMAND), tp/Texinfo/XS/main/command_data.awk, tp/Texinfo/XS/main/element_types.awk: set elt_info_number in element_types.awk only. 2024-06-04 Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (process_footnotes): rename variables and fields. * tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Info.pm (format_image), tp/Texinfo/Convert/Plaintext.pm (process_footnotes) (format_image, _convert), tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/XS/convert/convert_html.c (convert_image_command): check that extra, info, args and args_formatted exist before accessing them. * tp/Makefile.tres, tp/t/converters_tests.t (various_itemize_command_as_argument): add test of various brace commands, without braces, as @itemize argument. 2024-06-04 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_end_line_starting_block): check that the command_as_argument on @itemize line is alone without modifying an array, by looping over the contents as in C. * tp/Texinfo/ParserNonXS.pm (_end_line_starting_block), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block): simplify the code checking that the command as arg is brace noarg or has braces. * tp/Texinfo/ParserNonXS.pm (_handle_close_brace): simplify condition on args and contents. 2024-06-04 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (table_item_content_tree): determine the command name usable as Texinfo::Commands key by using the generic definfoenclose one if the type is definfoenclose. Similar to using element_builtin_cmd in C. 2024-06-03 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph_p): select types that could contain paragraphs only. Improve documentation of the code by listing the types that are avoided. 2024-06-03 Patrice Dumas Rename brace_command_container type as brace_arg 2024-09-28 Patrice Dumas Update test results 2024-06-03 Patrice Dumas Rename brace_command_arg type as brace_container 2024-06-03 Patrice Dumas Remove command_as_argument element type * tp/Texinfo/Convert/Text.pm (_convert): fix parentheses of brace command argument type test. * tp/Texinfo/Convert/LaTeX.pm (_convert): determine if a command as argument is the default for itemize by checking the parents and not the type. * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): determine that the command_as_argument element by comparing with the itemize parent extra value instead of using the type. * tp/Texinfo/Convert/Converter.pm (table_item_content_tree), tp/Texinfo/Convert/Texinfo.pm (_convert_to_texinfo) (_expand_cmd_args_to_texi): check that type is set before accessing and do not access type if not needed. * tp/Texinfo/ParserNonXS.pm (_end_line_starting_block) (_register_command_as_argument), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/parsetexi/parser.c (register_command_as_argument): do not set a special type for the command_as_argument, and do not set a flag in C. 2024-06-03 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph_p): add more types for commands. * tp/Texinfo/XS/main/tree.c (new_command_element): new function to add a command element, for clearer code. * tp/Texinfo/XS/structuring_transfo/structuring.c (new_block_command) (new_complete_node_menu, new_detailmenu), tp/Texinfo/XS/structuring_transfo/transformations.c (complete_node_menu): pass only an element to new_block_command, the caller should have called new_command_element already to set the command. * tp/Texinfo/XS/convert/convert_html.c (convert_float_command) (convert_printindex_command, html_convert_output), tp/Texinfo/XS/convert/converter.c (table_item_content_tree), tp/Texinfo/XS/main/convert_utils.c (expand_verbatiminclude) (definition_category_tree), tp/Texinfo/XS/main/manipulate_tree.c (new_asis_command_with_text, protect_text), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command) (handle_line_command, handle_block_command, handle_brace_command), tp/Texinfo/XS/parsetexi/macro.c (parse_macro_command_line), tp/Texinfo/XS/parsetexi/parser.c (new_value_element) (process_remaining_on_line), tp/Texinfo/XS/structuring_transfo/structuring.c (new_block_command), tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning, new_node) : set command elements types, use new_command_element. * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): call directly new_element with the correct type instead of modifying afterwards. 2024-06-03 Patrice Dumas * tp/Texinfo/XS/main/tree.c: remove completly spare_element, to avoid the complexity. Also elements are now more reused. 2024-06-01 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi) (convert_to_texinfo_internal), tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal), tp/Texinfo/XS/main/tree_types.h (ELEMENT), tp/Texinfo/XS/parsetexi/def.c (parse_def): replace inserted field by flags and add a corresponding flag. * tp/Texinfo/XS/convert/converter.c (table_item_content_tree), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/parsetexi/parser.c (register_command_as_argument): put command_as_argument as a flag. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command) (handle_brace_command), tp/Texinfo/XS/parsetexi/macro.c (parse_macro_command_line, handle_macro), tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph_p) (new_value_element, process_remaining_on_line), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): add types for @-commands in C. 2024-06-01 Patrice Dumas * tp/Texinfo/XS/main/builtin_commands.h (COMMAND), tp/Texinfo/XS/main/command_data.awk, tp/Texinfo/XS/main/element_types.awk, tp/Texinfo/XS/main/tree_types.h (ELEMENT), tp/Texinfo/XS/main/types_data.h (TYPE_DATA): prepare information on the number of elements needed to have the info_info associated info elements information. 2024-06-01 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal): do not call element_command_name for text elements. * tp/Texinfo/XS/main/manipulate_tree.c (copy_extra_info), tp/Texinfo/XS/main/tree.c (destroy_element), tp/Texinfo/XS/main/tree_types.h (CONTAINER, ELEMENT): move info_info to CONTAINER, as it is not used in text elements anymore. * tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/debug.c, tp/Texinfo/XS/main/extra.c, tp/Texinfo/XS/parsetexi/close.c: update to use info_info in CONTAINER and not directly in ELEMENT. 2024-06-01 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (store_additional_info) (element_to_perl_hash): pass the number of information to store_additional_info, and if some information is already set reuse the HV. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi) (convert_to_texinfo_internal), tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal), tp/Texinfo/XS/main/tree_types.h (ELEMENT), tp/Texinfo/XS/parsetexi/def.c (parse_def), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block): set inserted directly in the ELEMENT structure instead of in the info additional information. 2024-06-01 Patrice Dumas Type brace_command_container for brace_command_arg without spaces * tp/Texinfo/Convert/Converter.pm (table_item_content_tree), tp/Texinfo/Convert/NodeNameNormalization.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/Texinfo.pm (_expand_cmd_args_to_texi), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/ParserNonXS.pm (_print_command_args_texi) (_expand_macro_arguments, _isolate_last_space, _handle_open_brace), tp/Texinfo/XS/convert/converter.c (table_item_content_tree), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/main/node_name_normalization.c (convert_to_normalized_internal), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block), tp/Texinfo/XS/parsetexi/macro.c (expand_macro_arguments), tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): use a different container for brace commands args if the brace command is of the arguments type and the spaces are in the info data of the brace commands args, called brace_command_container. 2024-06-01 Patrice Dumas * tp/Texinfo/XS/parsetexi/def.c (parse_def), tp/Texinfo/XS/parsetexi/end_line.c (end_line_def_line): use directly the definition line arguments to determine the class/category/name for the index entry. Remove the returned information from parse_def. * tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): remove an impossible condition, as the linemacro call bracketed type is a different type now. * tp/Texinfo/XS/parsetexi/def.c (split_def_args): remove a redundant condition. 2024-06-01 Patrice Dumas * tp/Texinfo/XS/main/element_types.txt: remove unused space_command_arg. Reorder. 2024-06-01 Patrice Dumas * tp/Texinfo/Common.pm (%all_commands), tp/Texinfo/command_data.txt: as the internal commands also are in another category, they need to have a data field that can be compared to the category. The internal commands therefore need to be removed explicitly from the %all_commands hash. * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal): consider that an element with both a type and a command to be ignored if it is ignored both as a type element and as a command element. 2024-06-01 Patrice Dumas * tp/Texinfo/XS/structuring_transfo/transformations.c: add const. 2024-06-01 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (present_bug_message): add an end of line at the end of the additional_information, to avoid addition of the location of the error in present_bug_message. 2024-09-28 Patrice Dumas Update test result 2024-06-01 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (table_item_content_tree), tp/Texinfo/XS/convert/converter.c (table_item_content_tree): if the command_as_argument is a context brace command, such as @math or @footnote, corresponding to an arguably bogus @*table line, as @*table argument should only be indicatric commands, setup expected trees for these @-commands, to avoid debug messages/converter crashes. * tp/t/03coverage_braces.t (one_argument_leading_trailing_spaces): add noarg brace commands to the test. * tp/Makefile.tres, tp/t/converters_tests.t (various_vtable_command_as_argument): text with various non indicatric brace @-commands as @vtable argument. 2024-06-01 Patrice Dumas * tp/t/03coverage_braces.t (one_argument_leading_trailing_spaces): add accent commands to the test. 2024-05-31 Patrice Dumas Separate memory use in ELEMENT between text elements and other elements * tp/Texinfo/XS/main/tree_types.h (ELEMENT): make a union for TEXT and CONTAINER. 2024-09-28 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_command_description) (html_default_format_single_footnote), tp/Texinfo/XS/structuring_transfo/structuring.c (new_node_menu_entry): add missing ELEMENT c union. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/main/manipulate_tree.c (copy_extra_info) (modify_tree), tp/Texinfo/XS/main/translations.c (substitute_element_array), tp/Texinfo/XS/main/tree.c (destroy_element_and_children): do not recurse if in a text element. * tp/Texinfo/XS/parsetexi/macro.c (expand_macro_arguments): create ET_brace_command_arg element with new_element as it is not a text element. * tp/Texinfo/XS/structuring_transfo/transformations.c (insert_nodes_for_sectioning_commands): new_node_tree is not text, set it to ET_NONE and create with new_element. * tp/Texinfo/XS/main/tree.c (new_element, destroy_element), tp/Texinfo/XS/main/tree_types.h (CONTAINER, ELEMENT): add a CONTAINER structure for the information only relevant in container elements, and not in text elements. Remove from the ELEMENT and replace by a pointer to the CONTAINER structure. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/converter.c, tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/convert_to_texinfo.c, tp/Texinfo/XS/main/convert_to_text.c, tp/Texinfo/XS/main/convert_utils.c, tp/Texinfo/XS/main/debug.c, tp/Texinfo/XS/main/errors.c, tp/Texinfo/XS/main/floats.c, tp/Texinfo/XS/main/get_perl_info.c, tp/Texinfo/XS/main/manipulate_indices.c, tp/Texinfo/XS/main/manipulate_tree.c, tp/Texinfo/XS/main/node_name_normalization.c, tp/Texinfo/XS/main/output_unit.c, tp/Texinfo/XS/main/targets.c, tp/Texinfo/XS/main/translations.c, tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/main/utils.c, tp/Texinfo/XS/parsetexi/debug_parser.c, tp/Texinfo/XS/parsetexi/def.c, tp/Texinfo/XS/parsetexi/end_line.c, tp/Texinfo/XS/parsetexi/errors_parser.c, tp/Texinfo/XS/parsetexi/handle_commands.c, tp/Texinfo/XS/parsetexi/indices.c, tp/Texinfo/XS/parsetexi/labels.c, tp/Texinfo/XS/parsetexi/macro.c, tp/Texinfo/XS/parsetexi/menus.c, tp/Texinfo/XS/parsetexi/multitable.c, tp/Texinfo/XS/parsetexi/parser.c, tp/Texinfo/XS/parsetexi/source_marks.c, tp/Texinfo/XS/structuring_transfo/structuring.c, tp/Texinfo/XS/structuring_transfo/transformations.c: update for the change in ELEMENT by adding a ->c indirection to the container field. 2024-05-31 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_close_brace), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): if the argument of @errormsg is not text, still give an empty string as error message. * tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args): check if the argument is text before accessing the text length. * tp/Texinfo/XS/main/tree.c (new_text_element, destroy_element), tp/Texinfo/XS/main/tree_types.h (ELEMENT): setup the text field in ELEMENT to be a pointer, such as to be able later on to have it in an union along with another structure pointer for other elements. * tp/Texinfo/XS/parsetexi/end_line.c (end_line_def_line): check that the element type is text before accessing the text. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/converter.c, tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/convert_to_texinfo.c, tp/Texinfo/XS/main/convert_to_text.c, tp/Texinfo/XS/main/manipulate_indices.c, tp/Texinfo/XS/main/manipulate_tree.c, tp/Texinfo/XS/main/node_name_normalization.c, tp/Texinfo/XS/main/translations.c, tp/Texinfo/XS/main/utils.c, p/Texinfo/XS/parsetexi/close.c, tp/Texinfo/XS/parsetexi/debug_parser.c, tp/Texinfo/XS/parsetexi/def.c, tp/Texinfo/XS/parsetexi/end_line.c, tp/Texinfo/XS/parsetexi/handle_commands.c, tp/Texinfo/XS/parsetexi/indices.c, tp/Texinfo/XS/parsetexi/macro.c, tp/Texinfo/XS/parsetexi/menus.c, tp/Texinfo/XS/parsetexi/parser.c, tp/Texinfo/XS/parsetexi/separator.c, tp/Texinfo/XS/parsetexi/source_marks.c, tp/Texinfo/XS/structuring_transfo/structuring.c, tp/Texinfo/XS/structuring_transfo/transformations.c: update for change in ELEMENT text. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (new_text_element_added), tp/Texinfo/XS/main/tree.c (new_text_element): add a new function to setup a text element, to prepare for a different initialization and different struct union field use. Update calls. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/main/element_types.awk, tp/Texinfo/XS/main/types_data.h (TYPE_DATA): rename TYPE type as TYPE_DATA. * tp/Texinfo/XS/main/element_types.awk, tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES): generate types data in element_types.c instead of in types_data.c. Remove main/types_data.c and element_type_names. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_types_conversion, call_types_open), tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/builtin_commands.c (set_element_type_name_info), tp/Texinfo/XS/main/debug.c (print_element_debug), tp/Texinfo/XS/parsetexi/close.c (close_current), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_block_command), tp/Texinfo/XS/parsetexi/parser.c (merge_text) (abort_empty_line): use type_data[type].name instead of element_type_names[type]. 2024-09-28 Patrice Dumas * tp/Texinfo/XS/main/extra.c (lookup_extra_misc_args), tp/Texinfo/XS/main/manipulate_tree.c (associate_info_references), tp/Texinfo/XS/main/tree.c (destroy_associated_info): add missing KEY_PAIR union name k. Reorder ChangeLog to correspond to commits order. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (convert_sp_command) (convert_tab_command, convert_printindex_command), tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_misc_args) (lookup_extra_misc_args), tp/Texinfo/XS/main/manipulate_tree.c (associate_info_references), tp/Texinfo/XS/main/tree.c (destroy_associated_info), tp/Texinfo/XS/main/utils.c (informative_command_value), tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args, end_line_starting_block) (end_line_misc_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command), tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry), tp/Texinfo/XS/structuring_transfo/transformations.c (lookup_index_entry, relate_index_entries_to_table_items_in): use an ELEMENT_LIST for extra_misc_args. Add lookup_extra_misc_args. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry), tp/Texinfo/XS/structuring_transfo/transformations.c (relate_index_entries_to_table_items_in): set type as ET_other_text instead of ET_NONE. * tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/manipulate_tree.c (associate_info_references): always use text element with type ET_other_text in extra_misc_args. Use the type to determine if the element represents text or an integer. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/main/debug.c (print_element_debug): text element never have contents nor arg, nor command. * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal), tp/Texinfo/XS/main/convert_to_texinfo.c (convert_to_texinfo_internal), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/main/debug.c (print_element_debug), tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal) (relocate_source_marks, protect_text), tp/Texinfo/XS/main/node_name_normalization.c (convert_to_normalized_internal), tp/Texinfo/XS/main/utils.c (is_content_empty), tp/Texinfo/XS/structuring_transfo/transformations.c (protect_hashchar_at_line_beginning_internal): use type flags to determine if an element is a text element. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/main/element_types.txt: add more text flags for text elements. * tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal): text elements may have inserted info set, so copy info. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): reorganize to take into account that text element do not args nor contents nor extras. * tp/Texinfo/XS/parsetexi/parser.c (isolate_trailing_space) (isolate_last_space, process_remaining_on_line): pass last contents element as isolate_trailing_space argument. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/parsetexi/parser.c (check_space_element) (text_contents_to_plain_text, merge_text, isolate_trailing_space), (process_remaining_on_line), tp/Texinfo/XS/parsetexi/source_marks.c (place_source_mark): use type flags to determine if an element is a text element. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/main/element_types.awk: order correctly the types. * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES): add main/types_data.c as a normal built source file. * tp/Texinfo/XS/convert/converter.c (float_type_number, float_name_caption) (comma_index_subentries_tree, free_comma_index_subentries_tree), tp/Texinfo/XS/main/convert_utils.c (definition_category_tree): set ET_normal_text as type for normal text instead of ET_NONE. * tp/Texinfo/Common.pm (debug_print_element), tp/Texinfo/XS/parsetexi/debug_parser.c (print_element_debug_parser): text element never have contents nor arg, nor command. * tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): add other_text type to detect text not in regular converted tree elements. * tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args), tp/Texinfo/XS/parsetexi/handle_commands.c (parse_rawline_command) (handle_line_command), tp/Texinfo/XS/parsetexi/macro.c (expand_macro_arguments, expand_linemacro_arguments, handle_macro), tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line) (isolate_last_space_internal, gather_spaces_after_cmd_before_arg) (process_remaining_on_line), tp/Texinfo/XS/structuring_transfo/structuring.c (new_block_command), tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning): set type as ET_other_text instead of ET_NONE. * tp/Texinfo/XS/main/types_data.h (TYPE): rename type_name field as name. * tp/Texinfo/XS/parsetexi/close.c (is_container_empty), tp/Texinfo/XS/parsetexi/debug_parser.c (print_element_debug_parser): use type flags to determine if an element is a text element. 2024-05-31 Patrice Dumas Add data structure for information on types in C * tp/Texinfo/XS/main/types_data.h (TYPES), tp/Texinfo/XS/Makefile.am (BUILT_SOURCES, libtexinfo_la_SOURCES, EXTRA_DIST), tp/Texinfo/XS/main/element_types.awk, tp/Texinfo/XS/main/element_types.txt: add code in element_types.awk to setup a TYPE structure for information on types, similar to the COMMAND data, but with flags only. Add flags information in element_types.txt, to mark text elements. Generate the structure array with information on all the types in main/types_data.c. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/main/command_data.awk (END): initialize flags_str and other_flags_str for each command. 2024-05-31 Patrice Dumas * tp/Texinfo/XS/parsetexi/parser.c (check_space_element): fix conditional to detect better space elements. * tp/Texinfo/XS/convert/convert_html.c (html_internal_command_tree) (html_external_command_tree, html_default_format_program_string) (convert_value_command, convert_printindex_command), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/main/convert_utils.c (expand_today), tp/Texinfo/XS/main/manipulate_tree.c (parse_node_manual), tp/Texinfo/XS/parsetexi/parser.c (new_value_element), tp/Texinfo/XS/structuring_transfo/structuring.c (new_block_command) (new_node_menu_entry, new_detailmenu), tp/Texinfo/XS/structuring_transfo/transformations.c (new_node) (insert_nodes_for_sectioning_commands) (protect_hashchar_at_line_beginning_internal): set ET_normal_text as type for normal text instead of ET_NONE. * tp/Texinfo/XS/convert/convert_html.c (convert_menu_entry_type), tp/Texinfo/XS/main/manipulate_indices.c (idx_leading_text_or_command), tp/Texinfo/XS/main/manipulate_tree.c (parse_node_manual), tp/Texinfo/XS/main/utils.c (informative_command_value), tp/Texinfo/XS/parsetexi/handle_commands.c (check_no_text), tp/Texinfo/XS/parsetexi/menus.c (end_line_menu_entry), tp/Texinfo/XS/parsetexi/separator.c (handle_comma), tp/Texinfo/XS/structuring_transfo/transformations.c (protect_first_parenthesis, new_node): use type ET_normal_text to determine that an element is text instead of element text.space or text.end. * tp/Texinfo/XS/parsetexi/menus.c (end_line_menu_entry): use types ET_menu_entry_leading_text and ET_menu_entry_separator to determine that an element is text in menu entry. * tp/Texinfo/XS/main/manipulate_tree.c (copy_tree_internal): rearrange code and exit sooner if the element is a text element as there are no additional information nor contents nor args. * tp/Texinfo/XS/main/convert_utils.c (find_root_command_next_heading_command): add a bug message if normal text appears directly in top level (should be in a paragraph). 2024-09-28 Gavin Smith Tweak config paths for Info * info/infomap.c (locate_init_file): Check ~/.infokey before checking XDG_CONFIG_HOME, simililar to how GNU Emacs does it. Do not use /etc/xdg as a default for XDG_CONFIG_DIRS. Check in $sysconfdir/xdg/texinfo before XDG_CONFIG_DIRS, as with recent changes to texi2any. * info/Makefile.am (AM_CPPFLAGS): propagate sysconfdir * NEWS, doc/info-stnd.texi (Custom Key Bindings): update. 2024-05-31 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_split_delimiters): remove undefined warnings. * tp/Texinfo/ParserNonXS.pm (_end_line_menu_entry): update code now that contents are removed if empty. 2024-05-30 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_split_delimiters), tp/Texinfo/XS/parsetexi/def.c (split_delimiters): more readable check of already split elements. * tp/Texinfo/XS/parsetexi/close.c (close_current), tp/Texinfo/XS/parsetexi/def.c (split_delimiters, split_def_args) (parse_def), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command), tp/Texinfo/XS/parsetexi/indices.c (set_non_ignored_space_in_index_before_command, complete_indices), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): use ET_normal_text for normal text instead of ET_NONE. Mark special texts with a comment. * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command): for raw line arguments parsing, reuse the elements in args instead of allocating new ones. * tp/Texinfo/XS/parsetexi/def.c (split_delimiters, split_def_args), tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args) (end_line_starting_block), : use type to determine if an element is a text element when possible. 2024-05-30 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_merge_text), tp/Texinfo/XS/parsetexi/parser.c (merge_text): rename last_child as last_element. Set last_element in _merge_text to check type. * tp/Texinfo/ParserNonXS.pm (_merge_text, _abort_empty_line), tp/Texinfo/XS/parsetexi/parser.c (merge_text, abort_empty_line): add the leading empty text in merge_text instead of abort_empty_line, to clarify the code. Update abort_empty_line callers in C. 2024-05-30 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (%parser_document_state_initialization) (_abort_empty_line, _start_empty_line_after_command, _handle_macro) (_handle_open_brace, _handle_comma): instead of putting the command associated to internal spaces in the extra information of the space, put it in the state as internal_space_holder. Add the parser as _start_empty_line_after_command argument, update callers. Also reuse the internal space as the info spaces_before_argument of the command associated with the internal space in _abort_empty_line. * tp/Texinfo/ParserNonXS.pm (_isolate_last_space), tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space): always isolate the last space independentely of its type and type of the current container. * tp/Texinfo/ParserNonXS.pm (_isolate_last_space), tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space_internal): reuse the internal space as the info spaces_after_argument. * tp/Texinfo/XS/parsetexi/parser.c (begin_paragraph, merge_text): return 0 if the paragraph was not started. Shortcut the code merging text if a paragraph was started in merge_text. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash), tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/menus.c (handle_menu_entry_separators), tp/Texinfo/XS/parsetexi/parser.c (merge_text, abort_empty_line), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace), tp/Texinfo/XS/parsetexi/source_marks.c (place_source_mark): add a text type, normal_text, used internally in XS parser for regular text, instead of using ET_NONE. * tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space_internal): do not use an intermediate TEXT, directly set the new element text. Add last_elt as argument to isolate_last_space_internal. 2024-09-28 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c: add missing #include. 2024-05-28 Patrice Dumas * tp/Texinfo/XS/main/converter_types.h (TARGET_FILENAME) (enum command_location), tp/Texinfo/XS/main/utils.h: move TARGET_FILENAME and enum command_location to converter_types.h. * tp/Texinfo/XS/main/convert_utils.h, tp/Texinfo/XS/main/manipulate_indices.h: avoid dependencies on other header files defining also functions by using struct instead of types. Update includes. Order includes by starting from the most generic. 2024-09-28 Patrice Dumas * doc/texi2any_api.texi (Loading Init Files), doc/texinfo.texi (HTML Xref Configuration), tp/texi2any.pl (add_config_paths) (set_subdir_directories): search in $sysconfdir/xdg before XDG_CONFIG_DIRS. Do not search in XDG_DATA_DIRS. Agreement on Gavin report. 2024-09-26 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_formatted_nodedescription_nr) (_convert_menu_entry_type): add _formatted_nodedescription_nr based on _convert_menu_entry_type code. * tp/Texinfo/Convert/HTML.pm (command_description, _translate_names) (_file_header_information), tp/Texinfo/XS/convert/convert_html.c (html_command_description, file_header_information) (reset_html_targets_list, html_translate_names), tp/Texinfo/XS/main/converter_types.h (HTML_TARGET): add command_description to get the description associated to a node or sectioning command node. Use it to set description if there is no documentdescription (and to set keywords). Inspired by Benjamin Kalish report. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_command_description): XS override for html_command_description. * tp/Makefile.tres, tp/t/html_tests.t ($nodedescription_description_texinfo) (nodedescription_description) (nodedescription_description_no_use_nodes): test nodedescription used as meta description. 2024-09-26 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_file_header_information) (_default_format_begin_file, _default_format_node_redirection_page), tp/Texinfo/XS/convert/convert_html.c (BEGIN_FILE_INFORMATION) (destroy_begin_file_information, file_header_information) (html_default_format_begin_file) (html_default_format_node_redirection_page): add keywords to file_header_information returned information. 2024-09-25 Patrice Dumas * doc/texi2any_api.texi (Loading Init Files), doc/texinfo.texi (HTML Xref Configuration): hint that we do not follow strictly the XDG Base Directory Specification for defaults. 2024-09-25 Patrice Dumas * tp/texi2any.pl (add_config_paths, set_subdir_directories): mark $sysconfdir as deprecated by $sysconfdir/xdg. 2024-09-24 Patrice Dumas * doc/texi2any_api.texi (Loading Init Files), doc/texinfo.texi (HTML Xref Configuration), tp/texi2any.pl (add_config_paths) (set_subdir_directories): use $sysconfdir/xdg instead of $sysconfdir in search paths. Remove default absolute XDG Base Directory Specification system configuration and system data irectories from search path. * tp/texi2any.pl: do not add ./init to init files search path. 2024-09-23 Gavin Smith * contrib/EPUB_conformance: Remove subdirectory as patches are no longer useful - the issues they fixed have been fixed in the main program. 2024-09-23 Patrice Dumas * doc/refcard/txivarcheck (read_tp): ignore customization variable names beginning with _ that are internal variables. 2024-09-23 Patrice Dumas * doc/refcard/Makefile.am (ccheck, vcheck), doc/refcard/txicmdcheck (main), doc/refcard/txivarcheck (main): use srcdir to find programs and input files for out of source build. * util/txicmdlist (BEGIN), util/txicustomvars (BEGIN): use top_builddir to find Texinfo::ModulePath for out of source build. 2024-09-22 Gavin Smith * NEWS: remove bug-fix item that was in 7.1.1. 2024-09-22 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_CFLAGS): fix. 2024-09-22 Patrice Dumas * tp/Texinfo/XS/Makefile.am: change order of xs_LTLIBRARIES for relinking in make distcheck. 2024-09-22 Patrice Dumas * tp/Texinfo/XS/convert/get_converter_perl_info.c (get_sv_converter) (converter_initialize, converter_set_document, reset_output_init_conf) (copy_sv_options_for_convert_text), tp/Texinfo/XS/main/get_perl_info.c, tp/Texinfo/XS/Makefile.am (nodist_IndicesXS_la_SOURCES, ConvertXS_la_SOURCES): move functions needed converter code out of get_perl_info.c to a new file get_converter_perl_info.c. * tp/Texinfo/XS/Makefile.am (xs_LTLIBRARIES) (libtexinfo_convert_la_SOURCES, libtexinfo_convert_la_CPPFLAGS) (libtexinfo_la_CFLAGS, libtexinfo_convert_la_LDFLAGS) (IndicesXS_la_CPPFLAGS, IndicesXS_la_LIBADD, ConvertXS_la_SOURCES) (ConvertXS_la_LIBADD): add libtexinfo-convert.la library for converter code, including code linked against Perl called from converters. 2024-09-22 Patrice Dumas * tp/Texinfo/XS/configure.ac (perl_conf_PERL_LINK): setup flags to link against Perl when it is not in perl_conf_LDFLAGS. Not needed in the default case, but useful to link against Perl explicitly. 2024-09-22 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%css_element_class_styles): use an absolute border-radius for cartouche as a relative one looks bad when width and height are different. From Gavin. 2024-09-22 Patrice Dumas * p/Texinfo/XS/convert/call_html_perl_function.c (call_latex_convert_to_latex_math), tp/Texinfo/XS/main/call_perl_function.c: move call_latex_convert_to_latex_math to call_html_perl_function.c to avoid a dependency to build_tree_to_build in call_perl_function.c. * tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/build_perl_info.h, tp/Texinfo/XS/main/call_perl_function.c (newSVpv_utf8): move newSVpv_utf8 to call_perl_function.c as it is used here. Still declare newSVpv_utf8 in build_perl_info.h to avoid bringing Perl headers in call_perl_function.h. 2024-09-22 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES) (libtexinfo_la_CPPFLAGS, libtexinfo_la_CFLAGS, libtexinfo_la_LDFLAGS) (libtexinfoxs_la_SOURCES): move api_to_perl.c and call_perl_function.c to libtexinfo, as the functions are needed in libtexinfo code. Add Perl flags to libtexinfo_la_* accordingly. This is in order to avoid interdependencies between the libraries, such that -no-undefined can be used for libtexinfo. 2024-09-22 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_la_LDFLAGS), tp/Texinfo/XS/configure.ac (platform_LDFLAGS): add platform_LDFLAGS to contain -no-undefined on Windows to be used for shared libraries not linked against Perl. 2024-09-22 Patrice Dumas * configure.ac (--enable-ptys-tests, PTYS_TESTS): add --enable-ptys-tests, replacing have_ptys with PTYS_TESTS conditional. * info/Makefile.am (info_tests_with_pseudotty, info_tests, TESTS) (EXTRA_DIST): split TESTS in two, with info_tests_with_pseudotty tests that are only run if PTYS_TESTS is true. That way --disable-ptys-tests is acknowledged even if there is a pseudotty program present in the info directory. * info/Makefile.am (CLEANFILES): add pseudotty to CLEANFILES if it is not built. 2024-09-21 Patrice Dumas * configure.ac (tp-tests): do not conditionalize tp tests on prove, it is not needed since we switched to automake tap implementation. * tp/Makefile.am: inline tp_tests variable. 2024-09-21 Patrice Dumas * tp/Texinfo/XS/configure.ac (perl_conf_LDFLAGS): use string concatenation instead of += to add -no-undefined and associated flags. The previous code triggers an error in Cygwin in CI. 2024-09-21 Patrice Dumas * tp/Texinfo/options_data.txt, tp/ext/epub3.pm (epub_setup), tp/maintain/check_epubcheck_texi_t.sh: set dcterms:modified to the generation time in the default case as it is not a publication date, but a last modified date for the whole publication. Also set _INLINE_STYLE_WIDTH unconditionaly. Remove EPUB_STRICT. * NEWS, TODO, doc/texinfo.texi (EPUB Conformance), tp/TODO: update. * doc/texinfo.texi (Generating EPUB): update EPUB generated version. 2024-09-21 Patrice Dumas * tp/t/formats_encodings.t (japanese_shift_jis): assume that test should be skipped if there is no conversion from EUC-CN as an evidence of problematic iconv implementation. 2024-09-21 Patrice Dumas * tp/Texinfo/XS/configure.ac (fetch_conf): remove carriage return \r for the specific case of a Cygwin shell calling native Windows Perl, as it should be the only case where a carriage return could happen. Use a sed substitution based on a printf carriage return expansion for portability. 2024-09-20 Patrice Dumas * configure.ac: redirect STDERR to AS_MESSAGE_LOG_FD for tests of Perl modules checking several modules at once. 2024-09-20 Patrice Dumas * doc/tp_api/Makefile.am (MAKEINFO_ENVIRONMENT) (texi2any_internals_dependencies, texi2any_internals.texi): instead of going to srcdir, use --outdir pod2texi.pl option to specify a different output directory from the include directory and generate Texinfo files from the build directory. 2024-09-20 Patrice Dumas * Pod-Simple-Texinfo/pod2texi.pl (@included): fix included files information order in array reference. 2024-09-20 Patrice Dumas * Pod-Simple-Texinfo/pod2texi.pl ($pod2texi_help, $outdir) (@included): add --outdir to specify the directory where included files are output, with default based on --subdir. --subdir is now only used to specify include files directory from the main manual. 2024-09-18 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%css_element_class_styles) (_convert_def_command), tp/Texinfo/XS/convert/convert_html.c (convert_def_command): use CSS for DEF_TABLE table width setting, as it is styling. * tp/Texinfo/XS/convert/convert_html.c (convert_def_command): use open_element_with_class. 2024-09-18 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_def_command) (_convert_def_line_type), tp/Texinfo/XS/convert/convert_html.c (convert_def_command, convert_def_line_type): add 'generic' def-block and def-line classes for @def* commands. 2024-09-17 Gavin Smith * util/htmlxref.cnf: add gprofng. From Thérèse Godefroy . 2024-09-17 Patrice Dumas * NEWS, TODO: remove from TODO add to NEWS that attributes have been replaced by CSS. 2024-09-17 Patrice Dumas * tp/t/html_tests.t (simple_only_special_spaces_node): skip if Perl too old. 2024-09-16 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%css_element_class_styles) (_convert_menu_entry_type, _convert_menu_comment_type), tp/Texinfo/XS/convert/convert_html.c (convert_menu_entry_type) (convert_menu_comment_type): do not use empty spaces to add padding between menu columns, instead use CSS padding-left in the menu description cell. * tp/Texinfo/XS/convert/convert_html.c (convert_menu_entry_type): use open_element_with_class. 2024-09-16 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%css_element_class_styles) (_default_format_button_icon_img), tp/Texinfo/XS/convert/convert_html.c (html_default_format_button_icon_img): add a class for the icon img, remove align attribute and use CSS instead. 2024-09-15 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_default_format_navigation_header), tp/Texinfo/XS/convert/convert_html.c (html_default_format_navigation_header): do not set cellpadding nor cellspacing for VERTICAL_HEAD_NAVIGATION, it is not really useful and, if set, should be set with CSS. Add classes. 2024-09-15 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_default_format_navigation_panel), tp/Texinfo/XS/convert/convert_html.c (html_default_format_navigation_panel): do not set cellpadding nor cellspacing for HEADER_IN_TABLE table, the result is very similar to defaults. Add nav-button class to HEADER_IN_TABLE table td such that CSS can be used to set cell padding. 2024-09-15 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_menu_command), tp/Texinfo/XS/convert/convert_html.c (convert_menu_command): remove cellspacing in @menu formatting table. It is not really useful, and, if set, should be set with CSS such as to be customizable. 2024-09-15 Patrice Dumas Format HTML About directions explanations table with CSS * TODO, tp/Texinfo/Convert/HTML.pm (%css_element_class_styles) (_default_format_special_body_about), tp/Texinfo/XS/convert/convert_html.c (open_element_with_class) (default_format_special_body_about): add classes for all the
and in About directions explanations table and for the table itself. Set borders with CSS using those classes. 2024-09-15 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (file_header_information): use MATHJAX_CONFIGURATION customization variable. 2024-09-15 Patrice Dumas Format @cartouche in HTML with CSS and round corners * tp/Texinfo/Convert/HTML.pm (%css_element_class_styles) (_convert_cartouche_command), tp/Texinfo/XS/convert/convert_html.c (convert_cartouche_command): add CSS style for cartouche table with border and round corners. Remove border attribute. 2024-09-13 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%defaults): do not set MISC_BUTTONS to SECTION_BUTTONS in the default case, as there are no regular directions set for special output units. Add Top button instead of regular directions, with default now being the same as with TEXI2HTML style. Report from Rudolf Adamkovič. 2024-09-10 Gavin Smith * info/terminal.c (terminal_prep_terminal_hook): Return void not int. Report from Biswapriyo Nath. 2024-09-10 Patrice Dumas * doc/texinfo.texi (MathJax Customization Variables), tp/Texinfo/Convert/HTML.pm (output): add tex MathJax option block that tighten the configuration to what is really needed for MathJax in texi2any output. 2024-09-10 Patrice Dumas * tp/tests/Makefile.am (parser_tests_environment): add srcdir in the environment for parser_tests.sh calls. 2024-09-09 Patrice Dumas * tp/t/test_utils.pl (%formats, test): add the epub_file format, associated to convert_to_html. Minor changes in code. * tp/Makefile.tres, tp/t/epub_tests.t: use epub_file format. 2024-09-08 Patrice Dumas * NEWS, TODO, doc/texinfo.texi (Achieving strict EPUB conformance): document EPUB_STRICT and give other information on EPUB conformance. 2024-09-08 Patrice Dumas * tp/t/test_utils.pl (test): if $arg_output is set, output EPUB as an epub file if Archive::Zip is installed, by simply setting OUTFILE. * tp/t/test_utils.pl (_set_outfile_name, test): separate code setting output file name for $arg_output as _set_outfile_name. Use _set_outfile_name both for converted output for the diverse formats and for epub. 2024-09-08 Patrice Dumas * tp/t/test_utils.pl (test): if doing epub, set init_files_options EPUB_CREATE_CONTAINER_FILE in the default case. 2024-09-08 Patrice Dumas * tp/maintain/check_epubcheck_texi_t.sh: sort first level directories. 2024-09-08 Patrice Dumas * tp/t/epub_tests.t, tp/Makefile.tres, tp/t/html_tests.t: new t/epub_tests.t file for epub related tests. Move epub related tests from html_tests.t to epub_tests.t. 2024-09-08 Patrice Dumas * tp/t/test_utils.pl (test): if epub3.pm is loaded, compare *_epub_package/EPUB and *_epub_package/EPUB/xhtml contents. 2024-09-08 Patrice Dumas * doc/Makefile.am (wwwdoc-build): fix Pod/Simple/Texinfo.pm out of source path. 2024-09-08 Patrice Dumas * doc/Makefile.am (gendocs_envvars, wwwdoc-build): fix out of source wwwdoc-build build. 2024-09-08 Patrice Dumas * tp/ext/epub3.pm (epub_finish): remove a spurious tab character in container file. 2024-09-08 Patrice Dumas * tp/Texinfo/options_data.txt (_INLINE_STYLE_WIDTH), tp/ext/epub3.pm (epub_setup), tp/Texinfo/Convert/HTML.pm (_convert_tab_command) (_convert_def_command), tp/Texinfo/XS/convert/convert_html.c (convert_tab_command, convert_def_command): add _INLINE_STYLE_WIDTH customization variable. Replace width attribute by inline CSS if _INLINE_STYLE_WIDTH is set. Set _INLINE_STYLE_WIDTH in epub3.pm if EPUB_STRICT is set. 2024-09-07 Gavin Smith * README-hacking: manual build of pod2texi.html not required (since 2022-11-19). 2024-09-07 Gavin Smith * NEWS: add 7.1.1 release notice 2024-09-07 Patrice Dumas * tp/ext/epub3.pm (epub_finish): fix nav file formatting with gap in sectioning. * tp/Makefile.tres, tp/t/html_tests.t (section_part_epub): add a test of epub, with @part and starting at @section, leading to a gap in sectioning. 2024-09-07 Patrice Dumas * tp/ext/epub3.pm (epub_finish): fix nav file formatting with a command with a zero section level not appearing first, by consistently using $section_level. * tp/Makefile.tres, tp/t/html_tests.t (chapter_before_top_epub): test chapter before top in epub for nav file formatting. * tp/maintain/check_epubcheck_texi_t.sh: show the command used to generate EPUB in log. 2024-09-07 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands), tp/Texinfo/XS/convert/convert_html.c (convert_xref_commands): handle better formatting of internal ref in string context with nested references. * tp/maintain/check_epubcheck_texi_t.sh: call with NO_TOP_NODE_OUTPUT=0 to avoid lots of false positives. * tp/Makefile.tres, tp/t/html_tests.t (double_recursive_self_section_reference_node_no_use_node): new test of recursive references, split with USE_NODES=0. 2024-09-06 Patrice Dumas * tp/ext/epub3.pm (epub_finish): use transliterate_protect_file_name on opf file name to replace spaces, and avoid non ascii characters. * tp/t/test_utils.pl (test): add $srcdir.'ext/' to init files search path. * tp/Makefile.tres, tp/t/html_tests.t (setfilename_on_top_and_after_node_epub): add test of EPUB generation, tesing EPUB generation with files with spaces in their names. 2024-09-06 Patrice Dumas Percent encode file name in internal href * tp/Texinfo/Convert/HTML.pm (_internal_command_href), tp/Texinfo/XS/convert/convert_html.c (html_internal_command_href): call url_protect_file_text on target_filename to percent encode. 2024-09-06 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_default_format_button_icon_img) (_default_format_navigation_panel, _convert_menu_command) (_convert_printindex_command), tp/Texinfo/XS/convert/convert_html.c (html_default_format_button_icon_img) (html_default_format_navigation_panel) (html_default_format_navigation_header, convert_menu_command) (convert_printindex_command): remove border=0 for img and table as it is the dafault and a deprecated attribute. * tp/tests/many_input_files/Makefile.am (copy-tex-html, copy-tests): copy to $srcdir. 2024-09-06 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%css_element_class_styles) : center displaymath. Report and CSS from Rudolf Adamkovič. 2024-09-06 Patrice Dumas * tp/t/init/t2h_singular.init (singular_format_footer): update for close_registered_sections_level call change. 2024-09-06 Patrice Dumas * tp/ext/latex2html.pm (l2h_to_html): do not set latex2html -dir option if the destination directory is the current directory. Report by Jeremy Bryant. 2024-09-06 Patrice Dumas * tp/Makefile.am (test_files), tp/t/input_files/htmlxref-test.cnf, tp/t/htmlxref.t: rename t/input_files/htmlxref.cnf as t/input_files/htmlxref-test.cnf as now the htmlxref.cnf file found along with source files is used and could therefore interact with in-source conversions. 2024-09-06 Patrice Dumas * tp/init/book.pm (book_convert_heading_command): sync with HTML.pm. 2024-09-05 Patrice Dumas * doc/texi2any_api.texi (Heading Commands Formatting), tp/Texinfo/Convert/HTML.pm (register_opened_section_level) (close_registered_sections_level, _initialize_output_state), tp/Texinfo/XS/convert/ConvertXS.xs (html_register_opened_section_level) (html_close_registered_sections_level), tp/Texinfo/XS/convert/convert_html.c (html_register_opened_section_level) (html_register_opened_filename_section_level) (html_close_registered_sections_level) (html_close_registered_filename_sections_level, html_set_pages_files) (html_conversion_finalization, html_free_converter), tp/Texinfo/XS/main/converter_types.h (STRING_STACK_LIST, CONVERTER): add a filename argument to register_opened_section_level and close_registered_sections_level to avoid closing sections in another file. Update XS interface. Update callers. 2024-09-05 Patrice Dumas * tp/ext/epub3.pm (epub_convert_special_unit_type): rename $element variable as $output_unit. 2024-09-05 Patrice Dumas * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/html_tests.t (simple_only_special_spaces_node), t/init/no_navigation.pm, t/input_files/simple_only_special_spaces_node.texi: add a simpler version of only_special_spaces_node as a file_test split by node as the smallest case that triggers a bug with div closed in the wrong file. 2024-09-05 Patrice Dumas * TODO: add an entry for printindex formatting in HTML, to avoid using table and refer to past discussions. 2024-09-05 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_heading_command) (_open_node_part_command), tp/Texinfo/XS/convert/convert_html.c (convert_heading_command, open_node_part_command): set in_skipped_node_top when opening a @node (or associated @part), not after processing the contents. * tp/Makefile.tres, tp/t/40moresectioning.t (nodes_no_section_footnote_no_top_node_output): add test with footnote in a node after a skipped Top node, with USE_NODES=0. * tp/t/*.t: Use the hash notation to set USE_NODES. 2024-09-04 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands), tp/Texinfo/XS/convert/convert_html.c (convert_xref_commands): avoid an infinite recursion going through ref to node on sectioning command line and ref to sectioning command on node line, in case USE_NODES is 0. * tp/Makefile.tres, tp/t/30sectioning.t (double_recursive_self_section_node_reference_no_use_node): test double recursive self section node reference with USE_NODES=0. 2024-09-04 Patrice Dumas * tp/maintain/all_tests.sh: use $srcdir, adapt for out of source build. 2024-09-04 Patrice Dumas * tp/Texinfo/options_data.txt (EPUB_STRICT): add. * tp/ext/epub3.pm (epub_finish): if EPUB_STRICT is set, use the EPUB generation time for dcterms:modified. Based on patch from Daniel Cerqueira . * tp/maintain/check_epubcheck_texi_t.sh: set LC_ALL and LANGUAGE for reproducible errors. Use EPUB_STRICT in call. Keep the epub_package directory. 2024-09-04 Patrice Dumas * tp/maintain/check_epubcheck_texi_t.sh: check systematically EPUB t/*.t tests validity. 2024-09-04 Patrice Dumas * tp/maintain/check_back_xml_forth_texi_t.sh: add $srcdir for out of source builds. 2024-09-03 Patrice Dumas Use
 for @displaymath HTML formatting

	* NEWS, tp/Texinfo/Convert/HTML.pm (%css_element_class_styles),
	tp/Texinfo/Convert/HTML.pm (_convert_displaymath_command),
	tp/Texinfo/XS/convert/convert_html.c (convert_displaymath_command):
	use 
 for @displaymath formatting such that Texinfo source
	indentation is kept, in particular for text browsers.  Report from
	Rudolf Adamkovič.

2024-09-03  Gavin Smith 

	Update FSF address

	* doc/texinfo.texi,
	* doc/info-fr.texi,
	* doc/refcard/txirefcard.tex,
	* texindex/jrtangle,
	* texindex/jrweave:
	Update FSF address or replace with link to website

	* doc/refcard/txirefcard.tex: remove defunct www.gnupress.org link

2024-08-29  Gavin Smith 

	* README-hacking: add a couple of points for building from
	release branch

2024-09-03  Patrice Dumas  

	Add MATHJAX_CONFIGURATION customization variable

	* tp/Texinfo/options_data.txt, doc/texinfo.texi (MathJax Customization
	Variables), tp/Texinfo/Convert/HTML.pm (_file_header_information)
	(output), NEWS: add MATHJAX_CONFIGURATION customization variable, for
	user wanting to change the global MathJax object configuration.
	Report from Rudolf Adamkovič.

2024-08-28  Patrice Dumas  

	Use XDG Base Directory Specification for directory lookups

	* tp/Texinfo/Common.pm (locate_file_in_dirs), tp/t/test_utils.pl
	(test), tp/texi2any.pl (locate_and_load_init_file)
	(locate_and_load_extension_file): add deprecated directories argument
	and return deprecated directories used.  Update callers.

	* tp/texi2any.pl (add_config_paths): add function to setup directories
	using XDG Base Directory Specification environment variable,
	installation directory and default XDG Base Directory Specification
	directories.  The default XDG Base Directory Specification directories
	are added (last) even if the environment variable is set, such as to
	always have directories searched implementation and user-configuration
	independent.

	* tp/texi2any.pl (set_subdir_directories): set all the directories
	where files are searched for in a subdirectory.  In current directory,
	in HOME, following the XDG Base Directory Specification and by calling
	add_config_paths.  Set deprecated_dirs information with dot directory
	directly found in HOME that is deprecated by XDG Base Directory
	Specification HOME directories.  Use set_subdir_directories to set
	@texinfo_language_config_dirs, @program_config_dirs.

	* tp/texi2any.pl (_warn_deprecated_dirs, $config_init_files)
	(locate_and_load_init_file): warn for deprecated directories.

	* tp/Texinfo/Convert/Converter.pm (%common_converters_defaults),
	tp/texi2any.pl: pass main program deprecated directories information
	to converter through deprecated_config_directories key value.

	* tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): pass
	deprecated_config_directories to locate_file_in_dirs and warn about
	deprecated directories used.

	* NEWS, doc/texi2any_api.texi (Loading Init Files), doc/texinfo.texi
	(HTML Xref Configuration): update directory lookup descriptions.

2024-08-28  Patrice Dumas  

	* doc/texi2any_api.texi (Simple Navigation Panel Customization): the
	boolean set by button formatting function specifies that a delimiter
	is desired before the button.  Also update the description of the
	functions arguments.

2024-08-26  Patrice Dumas  

	* tp/texi2any.pl (%converter_format_expanded_region_name)
	(set_format): more explicit code and variable names to distinguish
	output format, converter format and expanded region.

2024-08-25  Patrice Dumas  

	* tp/texi2any.pl: fix a typo.

2024-08-25  Patrice Dumas  

	* doc/texinfo.texi (HTML Xref Configuration), tp/texi2any.pl
	(@texinfo_language_config_dirs): prepend curdir before the call of
	converter, and also add the leading input file path directory if
	there is a leading directory and it is not the current directory.

2024-08-25  Patrice Dumas  

	* doc/texinfo.texi (Invoking @command{texi2any}): correct -I and -P
	documentation, texi2any always search in the current directory and the
	input file path leading directory if there is one , irrespective of
	the -I and -P values given.

2024-08-25  Patrice Dumas  

	* doc/texi2any_api.texi (Modifying Main Program Array Variables),
	tp/Texinfo/Config.pm (texinfo_add_to_option_list): add a $prepend
	optional argument to texinfo_add_to_option_list, in which case the
	values are prepended.

2024-08-25  Patrice Dumas  

	Add TEXINFO_LANGUAGE_DIRECTORIES customization option

	* tp/Texinfo/Convert/Converter.pm (%defaults),
	tp/Texinfo/Convert/HTML.pm (_load_htmlxref_files),
	tp/Texinfo/options_data.txt, tp/texi2any.pl ($cmdline_options): add
	TEXINFO_LANGUAGE_DIRECTORIES to replace the
	'texinfo_language_config_dirs' information passed directly to
	converters.

2024-08-03  Patrice Dumas  

	* tp/Texinfo/Convert/Converter.pm (%common_converters_defaults),
	tp/Texinfo/Convert/HTML.pm (_load_htmlxref_files), tp/texi2any.pl:
	rename language_config_dirs as texinfo_language_config_dirs.

2024-08-25  Patrice Dumas  

	* tp/Texinfo/Common.pm (locate_file_in_dirs): if the input file path
	contains directories, returns it if it is found but do not search it
	in directories.

	* doc/texi2any_api.texi (Loading Init Files), doc/texinfo.texi (File
	Names and Links Customization for HTML): update documentation.

2024-08-25  Patrice Dumas  

	* doc/texinfo.texi (HTML Xref Link Basics, HTML Xref Configuration):
	remove the "HTML Xref Mismatch" node, it is not the best way to go and
	somewhat obsolete.  Keep the information in tp/TODO.  Add some
	information on mismatched cross-references in the last paragraphs of
	"HTML Xref Link Basics".

2024-08-25  Gavin Smith 

	* util/htmlxref.cnf (smtp, smtpmail): Rename to smtpmail to
	match name of manual.  Report from Eli.

2024-08-24  Patrice Dumas  

	 * tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files)
	 (_external_node_href), tp/Texinfo/XS/convert/convert_html.c
	 (external_node_href): use an empty string for an htmlxref manual
	 entry without URL prefix instead of undef.

2024-08-24  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): no warning for
	an empty URL prefix as it is the only way to override an entry
	appearing in a file processed later on.

	* tp/t/htmlxref.t (htmlxref_no_urlprefix_first), tp/Makefile.tres,
	tp/t/input_files/htmlxref-no_urlprefix_first.cnf, tp/Makefile.am
	(test_files): new test with htmlxref entry with an empty URL prefix
	before an entry with URL prefix.

2024-08-23  Patrice Dumas  

	* INSTALL: correct a typo.

2024-08-23  Patrice Dumas  

	EPUB Conformance issues documentation, workarounds and TODO

	* TODO, doc/texinfo.texi (EPUB Conformance),
	contrib/EPUB_conformance/*.patch, contrib/EPUB_conformance/README:
	document that EPUB generated is not conformant.  Add patches from
	Daniel Cerqueira in contrib/EPUB_conformance/ that cannot be applied
	as is, but are necessary for EPUB conformance.  Add TODO entries that
	should allow to fix more permanently this issue.

2024-08-22  Gavin Smith 

	* util/htmlxref.cnf: Add eglot.  Report from Eli.

2024-08-22  Gavin Smith 

	* README-hacking: add extra build system checks.  From Patrice
	and Bruno.

2024-08-22  Gavin Smith 

	No 'local' in shell script

	* install-info/tests/defs.in (findprog): Remove use of
	'local' for saving the value of IFS (input field separator).
	On Solaris 10 there is a warning "local: not found" and it
	is likely stopping IFS from being reset correctly, leading
	to subsequent errors.


2024-08-21  Patrice Dumas  

	* doc/texinfo.texi: modify, reassociate and comment out
	@nodedescription that were incorrectly associated with EPUB related
	nodes.

2024-08-20  Bruno Haible 

	build: Fix failure of all install-info tests on Solaris 11.4.

	* install-info/tests/defs.in (DIFF_OPTIONS): New variable.
	(diff): Remove variable.
	* install-info/tests/ii-*-test: Use diff $DIFF_OPTIONS instead
	of ${diff}.

2024-08-18  Gavin Smith 

	Check for diff --strip-trailing-cr.

	* configure.ac (DIFF_OPTIONS, DIFF_U_OPTION, DIFF_A_OPTION):
	Do not AC_SUBST DIFF_U_OPTION or DIFF_A_OPTION, using DIFF_OPTIONS
	instead.
	(DIFF_CR_OPTION) [mingw]: Check if --strip-trailing-cr option
	works and include it in DIFF_OPTIONS if so.

	* tp/tests/run_parser_all.sh,
	* tp/defs.in,
	* tp/tests/many_input_files/different_encodings.sh,
	* tp/tests/many_input_files/different_languages_gen_master_menu.sh,
	* tp/tests/many_input_files/input_dir_non_ascii.sh,
	* tp/tests/many_input_files/output_dir_file_non_ascii.sh,
	* tp/tests/many_input_files/output_dir_non_ascii.sh,
	* tp/tests/many_input_files/tex_l2h.sh,
	* tp/tests/many_input_files/tex_l2h_output_dir_non_ascii.sh,
	* tp/tests/many_input_files/tex_t4ht.sh,
	* tp/tests/many_input_files/tex_t4ht_output_dir_non_ascii.sh,
	* Pod-Simple-Texinfo/test_scripts/manual_sectioning_gap_test.sh,
	* Pod-Simple-Texinfo/test_scripts/test_empty_head2.sh,
	* Pod-Simple-Texinfo/test_scripts/test_ref_to_unknown.sh:
	Use DIFF_OPTIONS instead of DIFF_A_OPTION and/or DIFF_U_OPTION
	in order to have --strip-trailing-cr possibly included.

	* install-info/defs.in: Remove handling of --strip-trailing-cr,
	using DIFF_OPTIONS instead.

	Test failures due to carriage returns on mingw reported by
	Bruno Haible, bug-texinfo 2024-06-09.

2024-08-17  Patrice Dumas  

	* tp/Texinfo/Structuring.pm (new_node_menu_entry),
	tp/Texinfo/XS/structuring_transfo/structuring.c (new_node_menu_entry):
	set source info for added node menu entries, as a source info is
	expected for node menu entries. Report from Dario Gjorgjevski and
	Gavin Smith.

2024-08-15  Gavin Smith 

	* build-aux/ar-lib: Remove.  It does not appear to be
	used anywhere.

2024-08-15  Gavin Smith 

	Untrack some build files

	* build-aux/compile, build-aux/config.guess, build-aux/config.sub,
	build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
	build-aux/missing, build-aux/tap-driver.sh, build-aux/test-driver:
	Untrack in git.  These files are imported when autogen.sh runs
	and this stops a divergence in the output of "git diff" if
	a different version of automake etc. is installed.

2024-08-15  Gavin Smith 

	* autogen.sh: Do not append command line arguments ("$@") to
	automake command line.  The purpose of this is unknown.  It
	meant that an incorrect "-n" flag would be printed in "chicken"
	mode.

2024-08-15  Gavin Smith 

	* tp/Texinfo/XS/pm_to_blib: Remove empty, apparently useless
	file.

2024-08-14  Gavin Smith 

	Add tp/Texinfo/XS/build-aux

	* tp/Texinfo/XS/configure.ac: Add AC_CONFIG_AUX_DIR to use
	"build-aux" to store some auxiliary build files.  From Bruno.

2024-08-13  Gavin Smith 

	* autogen.sh: Run autoreconf under tp/Texinfo/XS/ with
	AUTOPOINT=true.  From Bruno.


2024-08-10  Patrice Dumas  

	Update man/pod2texi.1, po*/*.po and gnulib generated gperf files

2024-08-10  Patrice Dumas  

	Update po files

2024-08-10  Patrice Dumas  

	Run gnulib-tool --add-import in tp/Texinfo/XS

2024-08-10  Patrice Dumas  

	Run gnulib-tool --add-import at top level

2024-08-10  Patrice Dumas  

	* tp/maintain/regenerate_C_options_info.pl,
	tp/maintain/regenerate_commands_perl_info.pl,
	tp/maintain/regenerate_documentlanguages-iana.pl,
	tp/maintain/regenerate_documentlanguages-loc.pl,
	tp/maintain/regenerate_perl_options_info.pl,
	tp/maintain/setup_accent_tables.pl,
	tp/maintain/setup_converters_code_tables.pl: add the information that
	a generated file is automatically generated if missing.
	Use the basename to name the script generating the code files such
	that the file content is the same in in and out of source builds.

	* tp/Texinfo/XS/Makefile.am (Commands.pm, Options.pm): depend on the
	generating script.

2024-08-10  Gavin Smith 

	* doc/tp_api/Makefile.am (texi2any_internals.texi):
	Change working directory to $(srcdir) before running pod2texi.
	This allows pod2texi to generate @include directives correctly
	with the --subdir option.
	(texi2any_internals_dependencies): List dependencies with
	../../ prefix instead of $(top_srcdir)/.
	(MAKEINFO_ENVIRONMENT): Use abs_top_srcdir and abs_top_buildir
	instead of top_srcdir and top_buildir.

	Analysis by Patrice.

2024-08-09  Patrice Dumas  

	* TODO: add Rahguzar demand of math rendered as image in Info.

2024-08-09  Patrice Dumas  

	Use prototypes instead of old style K&R definitions

	* info/pcterm.c (pc_goto_xy, pc_put_text, pc_write_chars)
	(pc_scroll_terminal, pc_initialize_terminal): use prototypes instead
	of old style K&R definitions.

	Changes in spacing.

2024-08-09  Gavin Smith 

	Remove VFunction.

	* info/terminal.c, info/terminal.h
	(terminal_begin_blink_hook, terminal_begin_bold_hook)
	(terminal_begin_inverse_hook, terminal_begin_standout_hook)
	(terminal_begin_underline_hook, terminal_clear_screen_hook)
	(terminal_clear_to_eol_hook, terminal_default_colour_hook)
	(terminal_down_line_hook, terminal_end_all_modes_hook)
	(terminal_end_inverse_hook, terminal_end_standout_hook)
	(terminal_end_underline_hook, terminal_get_screen_size_hook)
	(terminal_goto_xy_hook, terminal_initialize_terminal_hook)
	(terminal_new_terminal_hook, terminal_prep_terminal_hook)
	(terminal_put_text_hook, terminal_ring_bell_hook)
	(terminal_scroll_terminal_hook, terminal_set_bgcolour_hook,)
	(terminal_set_colour_hook, terminal_unprep_terminal_hook,)
	(terminal_up_line_hook, terminal_write_chars_hook):
	Declare with explicit variable list.
	(VFunction): Remove.

	C23 does not allow a variable list to be left undefined as ().
	Report from Jeffrey Cliff .

2024-08-08  Bruno Haible  

	* texindex/Makefile.am (texindex.awk): Move the generated
	texindex.awk from the build dir to the source dir.

	* man/Makefile.am (man/Makefile.am): Set environment variable
	TEXINDEX_SCRIPT, so that the texindex program find its
	texindex.awk script.

2024-08-08  Gavin Smith 

	* Pod-Simple-Texinfo/Makefile.am (pod2texi):
	Remove replacement of USE_EXTERNAL_LIBINTL,
	USE_EXTERNAL_EASTASIANWIDTH and USE_EXTERNAL_UNIDECODE as
	these no longer occur in pod2texi.pl (since change
	on 2023-09-24).

2024-08-08  Patrice Dumas  

	* doc/tp_api/Makefile.am (texi2aany_internals.texi): Generate
	in srcdir.  Report from Bruno.

2024-08-08  Gavin Smith 

	* man/Makefile.am (MAKEINFO): Remove unused (this also had incorrect
	spelling of another variable).

2024-08-08  Gavin Smith 

	* Makefile.am (BUILT_SOURCES): Add tp/Texinfo/ModulePath.pm along
	with rule to generate it.  This helps in running "make dist"
	without running "make" first.  Report from Bruno.

2024-08-07  Patrice Dumas  

	* info/Makefile.am (../gnulib/lib/libgnu.a):
	Add rule to allow running "make dist" without running "make"
	first.  Report from Bruno Haible.

2024-08-07  Gavin Smith 

	* autogen.sh: Do not run autoreconf under tp/Texinfo/XS/, running
	individual tools instead.  This stops autopoint running and
	overwriting files with older versions.

2024-08-07  Gavin Smith 

	* tp/Texinfo/XS: add or upgrade gettext files by following
	new instructions in configure.ac.

2024-08-07  Gavin Smith 

	* tp/Texinfo/XS/configure.ac: elaborate on comment using
	information from Bruno.

2024-08-07  Bruno Haible  

	build: Prepare for use of autopoint.

	* configure.ac: Add comments about use of autopoint.
	* tp/Texinfo/XS/configure.ac: Specify the same GNU gettext
	version as the top-level configure.ac. Add comments about use
	of autopoint.

2024-08-04  Gavin Smith 

	* README-hacking: Remove out-of-date information about running
	"make" before "make dist".

2024-08-04  Patrice Dumas  

	* doc/tp_api/Makefile.am (tp/Texinfo/ModulePath.pm):
	Add rule to allow running "make dist" without running "make"
	first.  Report from Bruno Haible.

2024-08-04  Patrice Dumas  

	* info/Makefile.am (../gnulib/lib/libgnu.a):
	Add rule to allow running "make dist" without running "make"
	first.  Report from Bruno Haible.

2024-07-27  Patrice Dumas  

	* t/init_files_tests.t
	(test_format_single_footnote_in_inline_content),
	tp/t/init/footnote_mark_in_inline_content.pm, tp/Makefile.tres,
	tp/Makefile.am (test_files): add a test for format_single_footnote
	custoization to have the footnote mark in inline content.  Partly
	based on Roger Crew code.

2024-07-27  Patrice Dumas  

	* doc/texi2any_api.tex (Customizing Footnotes),
	tp/Texinfo/Convert/HTML.pm (_default_format_single_footnote)
	(_default_format_footnotes_sequence),
	tp/Texinfo/XS/convert/call_html_perl_function.c
	(call_formatting_function_format_single_footnote),
	tp/Texinfo/XS/convert/convert_html.c
	(html_default_format_single_footnote, format_single_footnote)
	(html_default_format_footnotes_sequence): format the footnote text in
	format_single_footnote.  Remove footnote_text argument of
	default_format_single_footnote, add the footnote element and
	number_in_doc.

2024-07-26  Patrice Dumas  

	Add format_single_footnote formatting reference for a single footnote

	* doc/texi2any_api.texi (Customizing Footnotes),
	tp/Texinfo/Convert/HTML.pm (%default_formatting_references)
	(_default_format_single_footnote, _default_format_footnotes_sequence),
	tp/Texinfo/XS/convert/call_html_perl_function.c
	(call_formatting_function_format_single_footnote),
	tp/Texinfo/XS/convert/convert_html.c
	(html_default_format_single_footnote, format_single_footnote)
	(html_default_format_footnotes_sequence): add a formatting reference
	for a single footnote.  Based on a report and a patch of Roger Crew.

2024-07-26  Patrice Dumas  

	* doc/Makefile.am (MAINTAINERCLEANFILES): set generated Texinfo files
	as MAINTAINERCLEANFILES.

	* tp/Texinfo/XS/Makefile.am (MAINTAINERCLEANFILES): set generated
	source files as MAINTAINERCLEANFILES.

2024-07-26  Patrice Dumas  

	* doc/tp_api/Makefile.am (DISTCLEANFILES, dist-info): do not
	distribute Info files.

	* doc/tp_api/Makefile.am (maintainerclean-local)
	(MAINTAINERCLEANFILES): remove generated Texinfo file with
	maintainerclean.

2024-07-25  Patrice Dumas  

	* tp/init/book.pm (book_convert_heading_command):  sync with HTML.pm.

2024-07-20  Gavin Smith 

	* util/htmlxref.cnf: Add use-package.

	From Jacob Ilsø Christensen 

2024-07-20  Gavin Smith 

	* util/htmlxref.cnf: Change cran.r-project.org to CRAN.R-project.org.

	From Sebastian Meyer .

2024-07-06  Patrice Dumas  

	* doc/texinfo.texi (Typed Functions): fix parenthesis in example.

2024-06-30  Gavin Smith 

	* util/htmlxref.cnf: add R-FAQ.

	From Sebastian Meyer .

2024-06-17  Gavin Smith 

	* doc/tp_api/Makefile.am (texi2any_internals.texi):
	Pass -f option to rm for removing temporary file.

2024-06-17  Patrice Dumas  

	Use explicit prototype for Info command functions

	* info/m-x.c (info_execute_command): call command function with two
	arguments only, window and count.

	* info/doc.h (InfoCommand), info/echo-area.c
	(read_and_dispatch_in_echo_area, ea_yank_pop)
	(ea_possible_completions), info/info.h (COMMAND_FUNCTION),
	info/makedoc.c (process_one_file), info/session.c
	(info_read_and_dispatch, read_key_sequence), info/terminal.h
	(VFunction): add a function type COMMAND_FUNCTION for pointers on info
	commands function and replace the VFunction untyped generic function
	type.  Move VFunction definition to terminal.h.

2024-06-17  Gavin Smith 

	Info tests timeout

	* info/t/Init-test.inc (TEXINFO_INFO_TESTS_TIMEOUT, run_ginfo):
	Use environment variable to allow changing tests timeout
	from the environment.  Increase default timeout from 5 to 10
	seconds. This is to support running the tests on slow systems,
	such as under CPU emulation.  Report of test timeouts from Nelson.

2024-06-17  Patrice Dumas  

	* tp/maintain/regenerate_C_options_info.pl: remove a spurious ; output
	after generated function definitions.

2024-06-16  Patrice Dumas  

	* system.h: remove strerror definition, the prototype looks wrong and
	the conditional is not set anywhere.

2024-06-16  Patrice Dumas  

	* info/filesys.h (infopath_string), info/infopath.c (infopath_string):
	remove extern in infopath_string filesys.h declaration.  Add void in
	infopath_string argument.

2024-06-11  Gavin Smith 

	* info/infomap.c (locate_init_file) [__MINGW32__]:
	Add missing semicolon.  From Bruno.

2024-06-11  Patrice Dumas  

	* doc/Makefile.am (pod2texi.texi), doc/tp_api/Makefile.am
	(MAKEINFO_ENVIRONMENT, MAKEINFO, texi2any_internals.texi): set/use
	environment variables to have ModulePath.pm work correctly.  Remove -I
	options now unneeded.

2024-06-11  Patrice Dumas  

	* tp/Texinfo/XS/main/utils.c (non_perl_malloc): add.

	* tp/Texinfo/XS/main/call_perl_function.c (call_collator_getSortKey):
	use non_perl_malloc instead of malloc.

2024-06-11  Patrice Dumas  

	* tp/Texinfo/XS/convert/call_html_perl_function.c
	(call_types_conversion): call non_perl_free instead of free.

	* tp/Texinfo/XS/convert/ConvertXS.xs,
	tp/Texinfo/XS/main/build_perl_info.c,
	tp/Texinfo/XS/main/get_perl_info.c,
	tp/Texinfo/XS/main/node_name_normalization.c,
	tp/Texinfo/XS/parsetexi/def.c: include stdlib.h for free.

2024-06-11  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/debug_parser.c: add missing stdlib.h
	include.  Report by Bruno.

2024-06-11  Patrice Dumas  

	Add missing void to prototypes

	* tp/Texinfo/XS/main/builtin_commands.h (set_element_type_name_info),
	tp/Texinfo/XS/main/parser_conf.c (register_conf): add void in
	prototypes.  Found thanks to -Wstrict-prototypes based on Bruno.

2024-06-11  Patrice Dumas  

	* doc/Makefile.am (pod2texi.texi): add
	-I $(top_builddir)/tp/Texinfo/XS.

	* tp/Texinfo/ModulePath.pm.in (init): do not add
	tp/Texinfo/XS/parsetexi to @INC, there is nothing to be found there.

	* tp/Texinfo/ModulePath.pm.in ($tp_builddir),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (init): rename builddir as
	tp_builddir.

2024-06-11  Patrice Dumas  

	doc: prefix target file names in srcdir with '$(srcdir)/'

	* doc/Makefile.am (html_default_commands_args.texi): prefix the
	target file names which is created in srcdir with '$(srcdir)/'.

2024-06-11  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/conf.c: add missing stdlib.h include.
	Report by Bruno.

2024-06-11  Patrice Dumas  

	Remove check and include of xlocale.h now done in gnulib locale

	* tp/Texinfo/XS/configure.ac, tp/Texinfo/XS/main/manipulate_indices.c:
	remove test of xlocale.h and explicit include, everything should be
	covered by the gnulibe locale module.  From Gavin and Bruno.

2024-06-11  Patrice Dumas  

	Add gnulib locale module for XS

	* tp/Texinfo/XS:
	Run "gnulib-tool --add-import locale"

2024-06-10  Bruno Haible  

	man: Add support for VPATH builds with OpenBSD 'make'

	* man/Makefile.am: In the rules that use HELP2MAN, prefix the
	target file names with '$(srcdir)/'.

2024-06-10  Patrice Dumas  

	Include xlocale.h for newlocale and other symbols if found

	* tp/Texinfo/XS/configure.ac (AC_CHECK_HEADERS),
	tp/Texinfo/XS/main/manipulate_indices.c: test if xlocale.h exists, and
	if yes include it.  Needed on MacOs.  Report from Bruno.

2024-06-10  Patrice Dumas  

	Fix out-of-source build of pod2texi.texi

	* doc/tp_api/Makefile.am (pod2texi.texi): create pod2texi.texi in
	$(srcdir) by passing the --subdir option.
	Pass "-I $(top_builddir)/tp" to perl to find generated modules,
	from Gavin.

2024-06-09  Gavin Smith 

	Fix out-of-source build of texi2any_internals.texi

	* doc/tp_api/Makefile.am (texi2any_internals.texi):
	Pass  "-I $(top_builddir)/tp" to perl to find generated modules.
	Filter output through sed by outputting a temporary file rather
	than piping output - this allows detecting if perl run failed.

2024-06-06  Patrice Dumas  

	* Makefile.am (po_document-check): Check for cdt, pcdt, cdt_string
	and gdt_string, by modifying the regex.  Some unused functions could
	be found, such as pgdt_string, but it should not be an issue.

	* po/Makevars, po_document/Makevars: add comments to remember to
	update po*-check when new functions are added as keywords.

2024-06-06  Patrice Dumas  

	* tp/Texinfo/XS/main/DocumentXS.xs (document_tree)
	(indices_sort_strings), tp/Texinfo/XS/main/build_perl_info.c
	(BUILD_PERL_DOCUMENT_ITEM, BUILD_PERL_DOCUMENT_LIST)
	(document_global_information): rename sv_ref to avoid false positiver
	reported by ppport.h as sv_ref is also exported as part of Perl API as
	a function.  Report by Gavin.

2024-06-06  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_convert),
	tp/Texinfo/XS/convert/convert_html.c
	(set_special_units_targets_files): remove code that is never run
	found with solaris compiler.

	* tp/Texinfo/XS/convert/convert_html.c
	(set_special_units_targets_files): MONOLITHIC option is integer.
	Found with solaris compiler.

2024-06-06  Patrice Dumas  

	* tp/Texinfo/XS/convert/call_html_perl_function.c: include ppport.h for
	G_LIST.

2024-06-06  Patrice Dumas  

	Substitute Perl formatting function for button only for Perl with cv_name

	* tp/Texinfo/XS/main/get_perl_info.c
	(html_get_button_specification_list): replace the Perl formatting
	function for button by a C formatting function for default formatting
	functions only if the PErl version has cv_name.  Based on ppport.h
	output, use 5.21.5 as minimum Perl version.  Based on Gavin
	investigations.

2024-06-06  Patrice Dumas  

	Do not use unnamed union for INDEX_COLLATOR

	* tp/Texinfo/XS/main/manipulate_indices.c (INDEX_COLLATOR): rename the
	union as coll.  Update codes using the corresponding union fields.

2024-06-06  Patrice Dumas  

	Do not use unnamed union for CONVERTER

	* tp/Texinfo/XS/main/converter_types.h (CONVERTER): rename the
	registered ids union as rid.  Update codes using the corresponding
	union fields.

2024-06-06  Patrice Dumas  

	Do not use unnamed union for COMMAND_OR_TYPE

	* tp/Texinfo/XS/main/converter_types.h (COMMAND_OR_TYPE): name the
	union as ct.  Update codes using the corresponding union fields.

2024-06-06  Patrice Dumas  

	Do not use unnamed union for OPTION

	* tp/Texinfo/XS/main/option_types.h: name the main union as o.  Update
	codes using the corresponding union fields.

2024-06-06  Patrice Dumas  

	Do not use unnamed union for KEY_PAIR and BUTTON_SPECIFICATION*

	* tp/Texinfo/XS/main/tree_types.h (KEY_PAIR): name the main union as
	k.  Update codes using the corresponding union fields.

	* tp/Texinfo/XS/main/option_types.h (BUTTON_SPECIFICATION_INFO)
	(BUTTON_SPECIFICATION): name the main union as b or bi.  Update codes
	using the corresponding union fields.

2024-06-05  Gavin Smith 

	* po/POTFILES.in: update

2024-06-05  Gavin Smith 

	* Makefile.am (po-check): Check for message_list_document_warn,
	message_list_document_error, message_list_command_warn and
	message_list_command_error.

2024-06-05  Gavin Smith 

	* Makefile.am (po-check): Remove check for lex/yacc sources as
	this does not apply anywhere in this package.

2024-06-04  Gavin Smith 

	Partial po/POTFILES.in update

	* po/POTFILES.in: add/remove some files

	* Makefile.am (po-check): Remove code checking for strings in
	.twjr files as it led to false positives for C files containing
	simply the string constant "__".  This code was not doing anything
	anyway as it was not enabled for "*.twjr" files.

	* TODO: mention that texindex strings don't seem to be
	translated.

2024-06-04  Gavin Smith 

	* tp/Texinfo/XS/convert/ConvertXS.xs,
	* tp/Texinfo/XS/convert/call_html_perl_function.c,
	* tp/Texinfo/XS/parsetexi/Parsetexi.xs:
	Add/remove #include "ppport.h" according to output of "perl ppport.h".

2024-06-04  Gavin Smith 

	* README-hacking: advice on upgrading ppport.h

2024-06-04  Gavin Smith 

	* tp/Texinfo/XS: run gnulib-tool --add-import

2024-06-04  Gavin Smith 

	Run gnulib-tool --add-import at top level

2024-06-03  Gavin Smith 

	* tp/Texinfo/ParserNonXS.pm (_handle_other_command)
	* tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command):
	Issue warning for @ at end of line command.

2024-06-03  Gavin Smith 

	* NEWS: add entry for SPARC memory alignment bugfix

2024-06-03  Gavin Smith 

	* NEWS: add entry for fix on 2024-02-09 "Fix unnumbered sections
	in PDF outline."

2024-06-03  Gavin Smith 

	* NEWS: add entry for fix on 2024-02-11 "Avoid crash from
	undefined style."

2024-06-03  Gavin Smith 

	* NEWS: add entry for fix on 2024-05-01 "Remove parent of @include
	or @setfilename source mark elements"

2024-06-02  Gavin Smith 

	* doc/texinfo.texi (The Top Node, Updating Commands):
	Avoid saying "sectioning command line" as this is confusing.

2024-06-02  Gavin Smith 

	Prepare for pretest release

	* configure.ac: bump version to 7.1.90.
	(AM_INIT_AUTOMAKE): add dist-xz option.

	* util/texi2dvi, util/texi2pdf, js/info.js: version, copyright date.

	* tp/texi2any.pl, info/info.c, install-info/install-info.c,
	texindex/ti.twjr, Pod-Simple-Texinfo/pod2texi: 2024 in version
	messages.

2024-05-29  Alfred M. Szmidt    (tiny change)

	* tp/Texinfo/XS/main/utils.c (clear_option, free_option)
	(initialize_option): Add a no-op compund statment to mitigate
	errors from GCC.

2024-05-29  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/parser.c (merge_text): remove unused
	variable.

2024-05-29  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/macro.c (handle_macro),
	tp/Texinfo/XS/parsetexi/parser.c (internal_space_holder)
	(abort_empty_line, start_empty_line_after_command),
	tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace, handle_comma):
	instead of putting the command associated to internal spaces in the
	extra information of the space, put it in a global element,
	internal_space_holder.
	Also reuse the internal space as the info spaces_before_argument
	of the command associated with the internal space.

2024-05-29  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/close.c (is_container_empty),
	tp/Texinfo/XS/parsetexi/macro.c: remove unused remove_empty_arg
	functions.  Make is_container_empty static.

2024-05-29  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (parse_file): cast the decode_string
	argument to char* to remove the const, as, even if decode_string do
	not modify its argument, it cannot be marked const if iconv input
	buffer is not const in iconv prototype.

2024-05-29  Patrice Dumas  

	Use the command line encoding for input file name in message

	* tp/Texinfo/XS/main/parser_conf.c (clear_parser_conf),
	tp/Texinfo/XS/main/parser_conf.h (PARSER_CONF),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs
	(parser_conf_set_COMMAND_LINE_ENCODING),
	tp/Texinfo/XS/parsetexi/conf.c (parser_conf_set_COMMAND_LINE_ENCODING)
	(reset_parser_conf): pass COMMAND_LINE_ENCODING to C code.

	* b/tp/Texinfo/XS/parsetexi/api.c (parse_file): use the
	COMMAND_LINE_ENCODING, if set, to decode the input file path name
	for error line part of the error message output if the input file
	cannot be opened.

2024-05-28  Patrice Dumas  

	* tp/Texinfo/XS/main/document.c
	(destroy_document_information_except_tree)
	(remove_document_descriptor): destroy the document structure fields
	and the small_strings even if the tree is not set.

	* tp/Texinfo/XS/main/document.c
	(unregister_document_merge_with_document): free the removed document
	itself and liberate the document list slot.

2024-05-28  Patrice Dumas  

	Fix error message of XS parser when the input file cannot be opened

	* tp/Texinfo/XS/parsetexi/api.c (initialize_parsing, parse_file)
	(parse_text, parse_string, parse_piece): have initialize_parsing
	return the document_descriptor and get it from there in parse_*.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_file),
	tp/Texinfo/XS/parsetexi/api.c (parse_file): add a status
	argument to parse_file in api.c, set it to non-zero if the parsing
	could not proceed.  Set the open error message in api.c parse_file,
	where the error can be converted to a string with strerror.  Return a
	document_descriptor even if there was an error.  In Parsetexi.xs
	parse_file, check the status, and if there was an error, get the
	parsing error and destroy the document.  Remove the error setting
	in Parsetexi.pm parse_texi_file, where $! is unlikely to be correct.

	* tp/Texinfo/ParserNonXS.pm (parse_texi_file): rename $input_file_name
	as $decoded_input_file_path.

	* tp/Texinfo/ParserNonXS.pm (parse_texi_file): do not pass the
	PROGRAM configuration value to document_error, it is not in the parser
	customization variables, and we do not want to add more.

2024-05-28  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file): remove the
	now useless call to fileparse.

2024-05-27  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
	set directly line to an empty string instead of going to the end of
	line.

	* tp/Texinfo/XS/parsetexi/parser.c (isolate_trailing_space):
	reuse text_len instead of calling strlen.

2024-05-27  Patrice Dumas  

	* tp/Texinfo/XS/main/translations.c (replace_substrings),
	tp/Texinfo/XS/main/utils.c (read_flag_len),
	tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block),
	tp/Texinfo/XS/parsetexi/handle_commands.c (parse_rawline_command),
	tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): replace
	read_flag_name by read_flag_len that only returns the length of the
	flag.  This allows to check first if there is a matching brace or if
	there is nothing remaining on the line before allocating the memory
	for the flag.  Update callers.

	* tp/Texinfo/XS/parsetexi/parser.c (new_value_element)
	(process_remaining_on_line): add length of flag as an argument to
	new_value_element.  Update callers.

	* tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line)
	(isolate_last_space_internal): use text_append_n instead of
	text_append.

	* tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space_internal):
	reuse text_len instead of calling strlen.

2024-05-27  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/macro.c (handle_macro): use strchrnul
	instead of strchr to have more common code.

2024-05-27  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_abort_empty_line),
	tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line): different debug
	message if additional_spaces are added or not.

	* tp/Texinfo/XS/parsetexi/parser.c (abort_empty_line),
	tp/Texinfo/XS/parsetexi/parser.c (merge_text): add a length
	argument for additional_spaces length.  Update callers.

2024-05-27  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/macro.c (handle_macro),
	tp/Texinfo/XS/parsetexi/menus.c (handle_menu_entry_separators)
	(end_line_menu_entry), tp/Texinfo/XS/parsetexi/parser.c (merge_text)
	(process_remaining_on_line), tp/Texinfo/XS/parsetexi/separator.c
	(handle_open_brace, handle_close_brace): add a text length argument to
	merge_text.  Update merge_text and callers.

	* tp/Texinfo/XS/parsetexi/close.c (close_current): use text_append_n
	instead of text_append.

	* tp/Texinfo/XS/parsetexi/multitable.c (gather_previous_item): output
	REPARENT debug message only if there are contents in before_item.

2024-05-27  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_gather_previous_item),
	tp/Texinfo/XS/parsetexi/multitable.c (gather_previous_item): add a
	debug message.

2024-05-27  Patrice Dumas  

	* tp/Texinfo/Translations.pm (configure): warn if $localesdir
	is undefined and do not call bindtextdomain nor _XS_configure
	in that case.

	* tp/t/same_parser_multiple_files.t: find $localesdir and call
	Texinfo::Translations::configure.

	* tp/t/test_utils.pl: add a comment to explain that even with
	LocaleData not found, the test could still succeed if the translations
	are found elsewhere.

2024-05-27  Patrice Dumas  

	* doc/tp_api/texi2any_internals_preamble.texi: add @setfilename for
	platforms with old automake < 1.6.2.

2024-05-27  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file): rename
	$input_file_name as $decoded_input_file_path.

	* tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_file),
	tp/Texinfo/XS/parsetexi/api.c (parse_file),
	tp/Texinfo/XS/parsetexi/input.c (input_push_file): rename filename as
	input_file_path.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_file),
	tp/Texinfo/XS/parsetexi/api.c (parse_file, parse_file_path): pass
	only the input file path to parse_file.  Determine the directory in
	parse_file using the new function parse_file_path.

	* tp/Texinfo/XS/parsetexi/input.c: add some const.

	Changes in comments.

2024-05-26  Patrice Dumas  

	* tp/Texinfo/XS/main/DocumentXS.xs (document_errors): warn if a
	document C data is not found.

	* tp/Texinfo/XS/main/build_perl_info.c (add_formatted_error_messages):
	remove error messages for situations that should not happen.

2024-05-26  Patrice Dumas  

	* tp/t/test_parse_texi_line.t: change in variable names, test the
	number of errors in any case.

	* tp/t/test_protect_hashchar_at_line_beginning.t: use
	Texinfo::XSLoader::XS_*_enabled, change in variable names, test the
	number of errors in any case, use a list for reference errors, use the
	same code for errors handling as in test_parse_texi_line.t.

2024-05-25  Patrice Dumas  

	* tp/Texinfo/XS/convert/convert_html.c (html_id_is_registered)
	(html_register_id, html_converter_initialize, html_reset_converter)
	(html_free_converter), tp/Texinfo/XS/main/converter_types.h
	(CONVERTER): make registered_ids a pointer in CONVERTER, to have only
	pointers in the registered ids union.

2024-05-25  Patrice Dumas  

	* tp/Texinfo/XS/main/converter_types.h (CONVERTER): rename seen_ids as
	registered_ids.  Update users.

	* tp/Texinfo/XS/convert/ConvertXS.xs (html_register_id)
	(html_id_is_registered), tp/Texinfo/XS/convert/convert_html.c
	(html_id_is_registered, html_register_id): add html_id_is_registered
	and html_register_id functions for registered_ids access.

	* tp/Texinfo/XS/convert/call_html_perl_function.c
	(init_registered_ids_hv, is_hv_registered_id, hv_register_id)
	(clear_registered_ids_hv, free_registered_ids_hv),
	tp/Texinfo/XS/convert/convert_html.c (USE_PERL_HASHMAP)
	(html_id_is_registered, html_register_id, html_converter_initialize)
	(html_reset_converter, html_free_converter),
	tp/Texinfo/XS/main/converter_types.h (CONVERTER): add an alternative
	interface to register and retrieve registered ids, using a Perl hash.
	If USE_PERL_HASHMAP is defined, the default, the Perl hash map is
	used.

2024-05-24  Patrice Dumas  

	* tp/Texinfo/XS/main/parser_conf.c: add a NOTE in comment explaining
	why the registered confs are never unallocated.

2024-05-24  Patrice Dumas  

	* tp/t/no_structure_test.t: uncomment the call to
	Texinfo::Tests::create_group_directory.

2024-05-24  Patrice Dumas  

	* tp/Makefile.am (test_files),
	tp/t/input_files/first_file_same_parser.texi,
	tp/t/input_files/last_file_same_parser.texi,
	tp/t/input_files/next_file_same_parser.texi, tp/Makefile.tres,
	t/same_parser_multiple_files.t: add a special test of reused parser
	used to parser different files.

2024-05-24  Patrice Dumas  

	* tp/Texinfo/Tests.pm (@EXPORT_OK, create_group_directory)
	(prepare_format_directories), tp/t/no_structure_test.t
	(_do_format_test_file): add a Package declaration in Texinfo/Tests.pm.
	Add create_group_directory, move _prepare_test_directory to
	Texinfo::Tests, renaming as prepare_format_directories.  Rename
	_run_file_test as _do_format_test_file.

2024-05-24  Patrice Dumas  

	* tp/Makefile.am, tp/t/test_utils.pl, tp/Texinfo/Tests.pm
	(compare_dirs_files, unlink_dir_files): add tp/Texinfo/Tests.pm for
	common code to be used in tests.

	* tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): avoid incorrect
	autovivification for bracketed_arg parent parent.

	* tp/Texinfo/XS/convert/convert_html.c (html_default_format_contents):
	do contents only if there is one section.

	* tp/Texinfo/Convert/DocBook.pm (_docbook_section_element, _convert),
	tp/Texinfo/Convert/HTML.pm (_convert_heading_command)
	(_prepare_output_units_global_targets, _default_format_contents),
	tp/Texinfo/Convert/TexinfoMarkup.pm (_convert),
	tp/Texinfo/OutputUnits.pm (units_directions),
	tp/Texinfo/Structuring.pm (section_level_adjusted_command_name),
	tp/Texinfo/XS/convert/convert_html.c (html_default_format_contents)
	(convert_heading_command), tp/Texinfo/XS/main/utils.c
	(section_level_adjusted_command_name): handle better extra
	section_level, section_directions and section_childs not set, in case
	there is a conversion without structuring information available.

	* tp/Makefile.tres, t/no_structure_test.t: add tests of conversion
	without calling Structuring code after parsing.

2024-05-23  Patrice Dumas  

	* tp/Texinfo/XS/main/document.c (wipe_document_errors)
	(wipe_document_parser_errors): rename clear_document_parser_errors as
	wipe_document_parser_errors and clear_document_errors as
	wipe_document_errors.  Update caller.

2024-05-23  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm: access 'accept_internalvalue' in 'conf'.

	* tp/Texinfo/ParserNonXS.pm (_initialize_parsing): only initialize
	states from conf if they are modified during parsing.

2024-05-23  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (parse_file): comment out the code
	adding the input file directory to the include directories list as it
	is already done in the main program.

2024-05-23  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm: access customization options in 'conf'
	if they are not supposed to change during parsing.

2024-05-23  Patrice Dumas  

	* tp/Texinfo/Document.pm (_add_element_to_identifiers_target): remove
	unused customization_information argument.

	* tp/Texinfo/Report.pm (line_warn, line_error), tp/Texinfo/Common.pm
	(get_perl_encoding, converter_or_registrar_line_warn),
	tp/Texinfo/Document.pm (_existing_label_error)
	(set_labels_identifiers_target, register_label_element),
	tp/Texinfo/ParserNonXS.pm (_line_warn) (_line_error): do not pass
	customization_information, pass directly $debug.  Update callers.

	* tp/Texinfo/Common.pm (locate_include_file): do not pass
	customization_information, pass directly $include_directories.  Update
	callers.

	* tp/Texinfo/Report.pm (document_warn, document_error),
	tp/t/test_parser_registrar.t: do not pass customization_information,
	pass directly $program_name. Update callers.

	* tp/Texinfo/ParserNonXS.pm (parse_texi_file, _encode_file_name)
	(_next_text, _end_line_misc_line),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info)
	(parse_texi_file), tp/t/do_master_menu.t,
	tp/t/test_protect_hashchar_at_line_beginning.t: access directly conf
	in $self->{'conf'}. remove get_conf from parsers.

2024-05-22  Patrice Dumas  

	* tp/Texinfo/XS/main/parser_conf.c (free_parser_conf, apply_conf):
	If the previous conf is not registered, free the list in addition to
	clearing them as they are overwritten.  Found with valgrind.

2024-05-22  Patrice Dumas  

	* tp/Texinfo/XS/main/translations.c (replace_convert_substrings): call
	reset_parser_conf now that the configurations can be separate.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): do not store the
	configuration for later reuse of the parser if accept_internalvalue is
	set, which is interpreted as being called from gdt, in which case the
	parser will not be reused.

2024-05-22  Patrice Dumas  

	* tp/Texinfo/XS/main/utils.c (wipe_values),
	tp/Texinfo/XS/parsetexi/macro.c: move wipe_values to utils.c such that
	it may be used by files in main.

2024-05-22  Patrice Dumas  

	* tp/Texinfo/XS/main/get_perl_info.c (apply_sv_parser_conf),
	tp/Texinfo/XS/main/parser_conf.c (apply_conf),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file)
	(parse_texi_piece, parse_texi_text, parse_texi_line),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_file, parse_piece)
	(parse_string, parse_text), tp/Texinfo/XS/parsetexi/conf.c
	(reset_parser_conf): pass parser to parser_* functions in Parsetexi.xs
	to retrieve the parser_conf_descriptor kept in the parser with
	apply_sv_parser_conf.  Replace the current global_parser_conf with the
	parser_conf associated with the parser by calling apply_conf.
	Do not clear global_parser_conf structures in reset_parser_conf if the
	global_parser_conf is registered.  Inline clear_global_parser_conf.

2024-05-22  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/input.c (parser_include_directories)
	(parser_locate_include_file), tp/Texinfo/XS/parsetexi/api.c
	(initialize_parsing, parse_file): add parser_include_directories,
	initialized from a copy of global_parser_conf.include_directories
	to add the input file directory for the parsing only and not to the
	configuration.

2024-05-22  Patrice Dumas  

	* tp/Texinfo/XS/main/parser_conf.c (parser_conf_list)
	(parser_conf_number, parser_conf_space, retrieve_parser_conf)
	(register_conf, clear_parser_conf), tp/Texinfo/XS/main/parser_conf.h
	(PARSER_CONF), tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (register_parser_conf),
	tp/Texinfo/XS/parsetexi/conf.c (reset_parser_conf): add
	parser_conf_list, a list of PARSER_CONF and register parser
	configuration setup at the end of Parsetexi.pm parser through the
	reset_parser_conf XS interface.  Clear memory of the global parser
	conf only if it is not registered.

2024-05-22  Patrice Dumas  

	* tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES),
	tp/Texinfo/XS/parsetexi/*.c, tp/Texinfo/XS/parsetexi/conf.c,
	tp/Texinfo/XS/main/parser_conf.c (global_parser_conf)
	(clear_parser_conf, clear_global_parser_conf),
	tp/Texinfo/XS/main/parser_conf.h (PARSER_CONF): add main/parser_conf.c
	and main/parser_conf.h with code from parsetexi/conf.c and
	parsetexi/conf.h, with the PARSER_CONF structure and
	clear_parser_conf.  Rename global parser_conf variable as
	global_parser_conf.

2024-05-21  Patrice Dumas  

	* tp/Texinfo/Document.pm (errors), tp/Texinfo/ParserNonXS.pm (errors),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (errors),
	tp/t/test_parse_texi_line.t: clear Texinfo::Report errors when
	returning them with a call to errors().

2024-05-21  Patrice Dumas  

	Reset parsing state to the configuration values before parsing

	* tp/Texinfo/Common.pm (%common_parser_customization)
	(%parser_customization, %parser_inner_options): rename
	%common_parser_options as %common_parser_customization and add
	LOCALE_ENCODING.  Rename %parser_options as %parser_customization and
	%parser_inner_configuration as %parser_inner_options.

	* tp/Texinfo/Common.pm (%parser_configuration)
	(%parser_document_state_configuration)
	(%parser_document_parsing_options): split %parser_state_configuration
	in two with %parser_configuration with registrar and
	%parser_document_state_configuration with values.  Add
	%parser_document_parsing_options for all the customizations and
	similar that should be set for a document parsing.

	* tp/Texinfo/ParserNonXS.pm (%parser_document_state_initialization)
	(%parsing_state_initialization): move 'sections_level_modifier' and
	'input_file_encoding' from %parsing_state_initialization to
	%parser_document_state_initialization.

	* tp/Texinfo/ParserNonXS.pm (parser, _initialize_parsing): base
	configuration on %Texinfo::Common::parser_document_parsing_options.
	Add a $parser_conf hash reference and fill it instead of modifying the
	parser itself for variables in Texinfo::Common
	parser_document_parsing_options and add only the others (only
	registrar, in practice) to the parser.  Store $parser_conf in
	$parser->{'conf'}.  Use $parser->{'conf'} to reset the parser in
	_initialize_parsing.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser, parse_texi_file)
	(_get_parser_info): update based on change in ParserNonXS.pm.  Inline
	_get_parser_error_registrar.

	* tp/Texinfo/XS/parsetexi/api.c (initialize_parsing): move code around
	to correspond better to type of variables in Perl.

	* tp/Texinfo/XS/parsetexi/conf.c (reset_parser_conf): set debug to 0
	in the default case.

2024-05-21  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (%parsing_state_initialization)
	(get_parser_info, _end_line_misc_line, _handle_close_brace): store
	'input_encoding_name' directly in $document->{'global_info'}.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/macro.c (new_macro): inline lookup_free_slot
	in new_macro.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/macro.c (free_slots_nr, lookup_free_slot)
	(new_macro, unset_macro_record, wipe_macros): keep track of the number
	of free slots available after calls of unset_macro_record.  If there
	is a free slot and the macro was not already found, use preferentially
	a free slot, found with lookup_free_slot.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/parsetexi/macro.c: add
	const.

2024-05-20  Patrice Dumas  

	Add const

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/main/debug.c (debug_protect_eol): always allocate the
	returned string.  Update callers.

	* tp/Texinfo/XS/parsetexi/commands.c (close_preformatted_command):
	remove obsolete check of index_entry_command.

	* tp/Texinfo/XS/parsetexi/macro.c (parse_macro_command_line):
	distinguish the line and pointers on line.

	* tp/Texinfo/XS/*/*.c: add const.  Use strndup instead of modifying
	temporarily an input line otherwise not modified to add an end of line.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/source_marks.c (source_marks_counters)
	(register_source_mark, transfer_source_marks): add
	source_marks_counters array to hold the source marks counters.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (parser_conf_reset_values)
	(parser_conf_add_value): rename parser_reset_values_conf as
	parser_conf_reset_values and parser_store_value as
	parser_conf_add_value.  Update users.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/conf.c: add parser_ in the name of all the
	functions in conf.c that are part of the parser public API.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/conf.h (PARSER_CONF): rename CONF as
	PARSER_CONF.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/conf.h (parser_conf): rename conf as
	parser_conf.  Update users.

2024-05-20  Patrice Dumas  

	Set remaining configuration vaiables in CONF

	* tp/Texinfo/XS/main/translations.c (replace_convert_substrings),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs
	(conf_set_DOC_ENCODING_FOR_INPUT_FILE_NAME)
	(conf_set_INPUT_FILE_NAME_ENCODING, conf_set_LOCALE_ENCODING)
	(conf_set_accept_internalvalue), tp/Texinfo/XS/parsetexi/api.c
	(reset_parser), tp/Texinfo/XS/parsetexi/commands.c (lookup_command),
	tp/Texinfo/XS/parsetexi/conf.c
	(conf_set_DOC_ENCODING_FOR_INPUT_FILE_NAME)
	(conf_set_INPUT_FILE_NAME_ENCODING, conf_set_LOCALE_ENCODING)
	(conf_set_accept_internalvalue, reset_conf),
	tp/Texinfo/XS/parsetexi/conf.h (CONF), tp/Texinfo/XS/parsetexi/input.c
	(encode_file_name), tp/Texinfo/XS/parsetexi/parser.c: add
	doc_encoding_for_input_file_name, input_file_name_encoding,
	locale_encoding and accept_internalvalue in CONF.  Add the
	corresponding functions to set them.  Remove
	parser_set_DOC_ENCODING_FOR_INPUT_FILE_NAME,
	parser_set_input_file_name_encoding, parser_set_locale_encoding,
	parser_set_accept_internalvalue, set_input_file_name_encoding,
	set_locale_encoding, set_doc_encoding_for_input_file_name and the
	corresponding variables.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/Common.pm (%parser_state_configuration)
	(%parser_inner_configuration, %parser_settable_configuration),
	tp/Texinfo/ParserNonXS.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): move
	%parser_state_configuration, %parser_inner_configuration and
	%parser_settable_configuration to Texinfo::Common.  Update
	Parsetexi.pm to set the same keys as ParserNonXS parser.  Inline
	_setup_conf in ParserNonXS.pm parser.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (initialize_parsing),
	tp/Texinfo/XS/parsetexi/parser.c: inline
	wipe_parser_global_variables in initialize_parsing.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_set_documentlanguage),
	tp/Texinfo/XS/parsetexi/api.c (initialize_parsing, reset_parser),
	tp/Texinfo/XS/parsetexi/conf.c (conf_set_documentlanguage)
	(reset_conf), tp/Texinfo/XS/parsetexi/conf.h (CONF),
	tp/Texinfo/XS/parsetexi/parser.c (wipe_parser_global_variables): add
	documentlanguage and global_documentlanguage_fixed in CONF, add
	conf_set_documentlanguage to set them.  Initialize
	global_documentlanguage in initialize_parsing.  Remove
	parser_set_documentlanguage_override and
	set_documentlanguage_override.

	* tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line),
	tp/Texinfo/XS/parsetexi/parser.c: inline set_documentlanguage in
	end_line_misc_line.

2024-05-20  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (parser_store_EXPANDED_FORMATS):
	iterate over EXPANDED_FORMATS in Parsetexi.xs.

2024-05-20  Patrice Dumas  

	Replace parser_expanded_formats by const.expanded_formats

	* tp/Texinfo/XS/main/utils.h: rename expanded_formats as
	default_expanded_formats, make it const and extern.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_clear_expanded_formats)
	(conf_add_expanded_format), tp/Texinfo/XS/parsetexi/api.c
	(reset_parser), tp/Texinfo/XS/parsetexi/conf.c (reset_conf)
	(conf_clear_expanded_formats, conf_add_expanded_format): add
	expanded_formats in CONF, add conf_clear_expanded_formats to clear,
	conf_add_expanded_format to add expanded formats and replace
	parser_expanded_formats by const.expanded_formats. Remove
	parser_clear_expanded_formats and parser_add_expanded_format.

	This changes the default expanded formats to be none, which matches
	Perl (and POD of Parser module).

2024-05-19  Patrice Dumas  

	Replace parser_include_dirs_list by conf.include_directories

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs
	(parser_store_INCLUDE_DIRECTORIES), tp/Texinfo/XS/parsetexi/api.c
	(reset_parser, parse_file), tp/Texinfo/XS/parsetexi/conf.c
	(conf_clear_INCLUDE_DIRECTORIES, conf_add_include_directory)
	(reset_conf), tp/Texinfo/XS/parsetexi/conf.h (CONF),
	tp/Texinfo/XS/parsetexi/input.c (parser_locate_include_file): iterate
	over the INCLUDE_DIRECTORIES array reference in XS
	parser_store_INCLUDE_DIRECTORIES function instead of doing it in Perl.
	Add include_directories STRING_LIST in CONF, add
	conf_clear_INCLUDE_DIRECTORIES to clear it and
	conf_add_include_directory to add to it and replace
	parser_include_dirs_list by conf.include_directories.  Remove
	parser_add_include_directory and parser_clear_include_directories.

2024-05-19  Patrice Dumas  

	Replace debug_output by conf.debug

	* tp/Texinfo/XS/main/translations.c (replace_convert_substrings),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_set_DEBUG),
	tp/Texinfo/XS/parsetexi/api.c, tp/Texinfo/XS/parsetexi/conf.c
	(conf_set_DEBUG, reset_conf), tp/Texinfo/XS/parsetexi/conf.h (CONF),
	tp/Texinfo/XS/parsetexi/debug_parser.c,
	tp/Texinfo/XS/parsetexi/errors_parser.c (line_error_internal),
	tp/Texinfo/XS/parsetexi/parser.c (complete_indices): add debug field
	in CONF, add conf_set_DEBUG function to set it, and replace
	debug_output by conf.debug.  Remove set_debug_output and
	parser_set_debug.

2024-05-19  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (initialize_parsing): rename
	reset_parser_except_conf to initialize_parsing and make it static.

2024-05-19  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (reset_parser_except_conf),
	tp/Texinfo/XS/parsetexi/parser.c (parse_texi): call
	init_index_commands in reset_parser_except_conf and not in parse_texi,
	now that reset_parser_except_conf only called right before parse_texi
	and not in reset_parser anymore.

2024-05-19  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (reset_parser_except_conf, parse_file)
	(parse_text, parse_string, parse_texi): call new_document and
	set_input_encoding in reset_parser_except_conf.

2024-05-19  Patrice Dumas  

	* tp/Texinfo/XS/main/translations.c (replace_convert_substrings):
	do not call reset_parser_except_conf, it is already called in
	parse_string.

2024-05-19  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): check on keys
	independentely of values.

2024-05-19  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser, parse_texi_piece)
	(parse_texi_text, parse_texi_line),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (parse_piece, parse_piece)
	(parse_string, parse_text, parser_add_expanded_format)
	(parser_set_input_file_name_encoding, parser_set_locale_encoding)
	(parser_set_documentlanguage_override): do not encode to UTF-8 in Perl
	code and get binary strings in XS, instead use SvPVutf8 to get string
	and convert to UTF-8 in XS.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): check on keys
	independentely of values, i.e. do not test in one condition the key name
	and whether the value is defined, use only the key name in the first
	condition and test afterwards if the value is defined.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs: change in spacing.

2024-05-19  Patrice Dumas  

	Remove memory leaks (valgrind)

	* tp/Texinfo/XS/parsetexi/api.c (parser_reset_values_conf): wipe
	conf values.

	* tp/Texinfo/XS/parsetexi/conf.c (reset_conf): do not call memset, in
	order to keep and reuse the conf.values list.  Wipe conf values.

	* tp/Texinfo/XS/parsetexi/macro.c (init_values): wipe parser values.

	* tp/Texinfo/XS/convert/convert_html.c,
	tp/Texinfo/XS/main/output_unit.c: remove memory leaks in debug
	messages.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/main/document_types.h (VALUE, VALUE_LIST): move VALUE
	definition to document_types.h, define VALUE_LIST.

	* tp/Texinfo/XS/parsetexi/macro.c (wipe_values): wipe values from a
	VALUE_LIST passed in argument.

	* tp/Texinfo/XS/parsetexi/macro.c (store_value, store_parser_value),
	(parser_values, clear_value, fetch_value),
	tp/Texinfo/XS/parsetexi/handle_commands.c (parse_rawline_command):
	modify store_value to store in a VALUE_LIST passed in argument.  Add
	the parser_values VALUE_LIST variable for the parser, replacing
	value_list, value_number and value_space that are removed.  Add
	store_parser_value that does the same as store_value previously by
	calling store_value with parser_values.  Update fetch_value and
	clear_value to use parser_values.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (parser_store_values),
	tp/Texinfo/XS/parsetexi/api.c (parser_reset_values_conf)
	(reset_parser_except_conf, reset_parser, parser_store_value),
	tp/Texinfo/XS/parsetexi/conf.c (reset_conf),
	tp/Texinfo/XS/parsetexi/conf.h (CONF), tp/Texinfo/XS/parsetexi/macro.c
	(init_values): add values field in CONF to store default values and
	values from parser initialization.  Pass all the values from Perl hash
	at once through parser_store_values.  Reset the default values in CONF
	in parser_store_values by calling parser_reset_values_conf before
	setting customization values.  Modify reset_conf to set the default for
	CONF values, setting txicommandconditionals.
	Add init_values to initialize the parser values by copying CONF
	values.  Call init_values in reset_parser_except_conf.
	Do not call wipe_values in reset_parser, init_values now initialize
	the parser values based on configuration.

	* tp/Texinfo/XS/parsetexi/macro.c (fetch_value): remove the special
	case for txicommandconditionals, it should be set in reset_conf or
	from Perl through parser_store_values.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (reset_parser, parse_file): call
	reset_parser_except_conf in parse_file instead of reset_parser.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (%parser_document_state_initialization):
	initialize explicitly 'current_part'.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/parser.c (parse_texi): set a document
	variable to keep track of the parsed document when the global variable
	is overwritten.

	* tp/Texinfo/XS/parsetexi/indices.c (complete_indices),
	tp/Texinfo/XS/parsetexi/parser.c (parse_texi): use a DOCUMENT in
	complete_indices call.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/main/document.c (new_document)
	(destroy_document_information_except_tree, clear_document_errors)
	(clear_document_parser_errors), tp/Texinfo/XS/main/document_types.h
	(DOCUMENT), tp/Texinfo/XS/main/DocumentXS.xs,
	tp/Texinfo/XS/main/build_perl_info.c,
	tp/Texinfo/XS/main/translations.c,
	tp/Texinfo/XS/parsetexi/errors_parser.c,
	tp/Texinfo/XS/structuring_transfo/structuring.c,
	tp/Texinfo/XS/structuring_transfo/transformations.c: put
	error_messages and parser_error_messages directly in DOCUMENT, not as
	a pointer.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/main/document.c (new_document)
	(destroy_document_information_except_tree),
	tp/Texinfo/XS/main/document_types.h (DOCUMENT),
	tp/Texinfo/XS/convert/ConvertXS.xs,
	tp/Texinfo/XS/convert/convert_html.c,
	tp/Texinfo/XS/convert/converter.c,
	tp/Texinfo/XS/main/build_perl_info.c,
	tp/Texinfo/XS/main/get_perl_info.c,
	tp/Texinfo/XS/parsetexi/handle_commands.c,
	tp/Texinfo/XS/parsetexi/parser.c,
	tp/Texinfo/XS/structuring_transfo/structuring.c,
	tp/Texinfo/XS/structuring_transfo/transformations.c: put
	global_commands directly in DOCUMENT, not as a pointer.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/main/document.c (new_document),
	tp/Texinfo/XS/main/document_types.h (DOCUMENT),
	tp/Texinfo/XS/convert/convert_html.c,
	tp/Texinfo/XS/main/DocumentXS.xs,
	tp/Texinfo/XS/main/build_perl_info.c,
	tp/Texinfo/XS/main/convert_to_text.c, tp/Texinfo/XS/main/utils.c,
	tp/Texinfo/XS/parsetexi/api.c,
	tp/Texinfo/XS/parsetexi/handle_commands.c,
	tp/Texinfo/XS/parsetexi/indices.c, tp/Texinfo/XS/parsetexi/input.c,
	tp/Texinfo/XS/parsetexi/macro.c, tp/Texinfo/XS/parsetexi/separator.c:
	put global_info directly in DOCUMENT, not as a pointer.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/main/document.c
	(unregister_document_merge_with_document): simplify code.

	* tp/Texinfo/XS/main/targets.c (set_labels_identifiers_target): pass a
	LABEL_LIST.  Update callers.

	* tp/Texinfo/XS/main/DocumentXS.xs (document_errors),
	tp/Texinfo/XS/main/build_perl_info.c (add_formatted_error_messages)
	(pass_errors_to_registrar): call clear_error_message_list out of code
	building Perl as far as possible.

	* tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/targets.c,
	tp/maintain/regenerate_C_options_info.pl: add const.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/main/DocumentXS.xs (set_document_global_info): fix
	format.

	* tp/Texinfo/XS/convert/converter.c,
	tp/Texinfo/XS/main/build_perl_info.c,
	tp/Texinfo/XS/main/get_perl_info.c, tp/Texinfo/XS/main/utils.c: add
	const.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/main/build_perl_info.c (build_target_elements_list)
	(build_internal_xref_list, build_float_types_list)
	(BUILD_PERL_DOCUMENT_LIST): use a list as input argument.  Update
	callers.  Modify BUILD_PERL_DOCUMENT_LIST to use a list too, using the
	address of the fieldname.

	* tp/Texinfo/XS/convert/convert_html.c,
	tp/Texinfo/XS/convert/get_html_perl_info.c,
	tp/Texinfo/XS/main/IndicesXS.xs, tp/Texinfo/XS/main/document.c
	(new_document, destroy_document_information_except_tree),
	tp/Texinfo/XS/main/document_types.h (DOCUMENT),
	tp/Texinfo/XS/main/floats.c (float_list_to_listoffloats_list)
	(free_listoffloats_list), tp/Texinfo/XS/main/targets.c
	(set_labels_identifiers_target, sort_labels_identifiers_target)
	(add_element_to_identifiers_target), tp/Texinfo/XS/main/utils.c
	(free_indices_info), tp/Texinfo/XS/parsetexi/end_line.c,
	tp/Texinfo/XS/parsetexi/indices.c, tp/Texinfo/XS/parsetexi/labels.c,
	tp/Texinfo/XS/parsetexi/parser.c (parse_texi),
	tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
	(relate_index_entries_to_table_items_in_tree),
	tp/Texinfo/XS/structuring_transfo/structuring.c,
	tp/Texinfo/XS/structuring_transfo/transformations.c: put directly
	structures in DOCUMENT instead of pointers for some fields that are
	not moved around.  Modify float_list_to_listoffloats_list and
	set_labels_identifiers_target to take in argument the list where the
	generated structure will be put instead of returning it.  Replace
	destroy_listoffloats_list by free_listoffloats_list, which does not
	destroy the argument.  Modify sort_labels_identifiers_target and
	add_element_to_identifiers_target to change only the list of
	identifiers_target, not the LABEL_LIST.  Replace wipe_index_names by
	free_indices_info that does not destroy the argument.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/main/document.c (document_list, retrieve_document)
	(new_document, remove_document_descriptor): store a document pointer
	in document_list, not a document, such that the document pointer
	remains valid upon reallocating.  Then it becomes easier to have
	fields in the document being themselves structures instead of pointers
	on structures.

2024-05-18  Patrice Dumas  

	* tp/Texinfo/XS/convert/convert_html.c (prepare_index_entries_targets)
	(convert_printindex_command, html_initialize_output_state)
	(html_reset_converter), tp/Texinfo/XS/convert/get_html_perl_info.c
	(find_index_entry_numbers_index_entry_sv),
	tp/Texinfo/XS/main/IndicesXS.xs (index_entry_element_sort_string),
	tp/Texinfo/XS/main/build_perl_info.c (build_index_data)
	(fill_document_hv), tp/Texinfo/XS/main/document.c
	(document_merged_indices, document_indices_sort_strings)
	(destroy_document_information_except_tree),
	tp/Texinfo/XS/main/document_types.h (INDEX_LIST),
	tp/Texinfo/XS/main/get_perl_info.c (find_index_entry_sv)
	(get_sv_index_entries_sorted_by_letter)
	(find_document_index_entry_extra_index_entry_sv)
	(find_element_extra_index_entry_sv),
	tp/Texinfo/XS/main/manipulate_indices.c (merge_indices)
	(setup_index_entries_sort_strings), tp/Texinfo/XS/main/utils.c
	(indices_info_index_by_name, wipe_index_names),
	tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args),
	tp/Texinfo/XS/parsetexi/indices.c (add_index_internal)
	(add_index, init_index_commands, forget_indices)
	(resolve_indices_merged_in, complete_indices),
	tp/Texinfo/XS/parsetexi/parser.c (parse_texi),
	tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
	(relate_index_entries_to_table_items_in_tree),
	tp/Texinfo/XS/structuring_transfo/transformations.c
	(lookup_index_entry, relate_index_entries_to_table_items_in)
	(relate_index_entries_to_table_items_internal)
	(relate_index_entries_to_table_items_in_tree): replace the index_names
	indices list by indices_info INDEX_LIST structure, with the number of
	indices. Pass an indices list as argument to
	resolve_indices_merged_in.

2024-05-18  Patrice Dumas  

	Setup an empty document early instead of storing variables at the end

	* tp/Texinfo/XS/main/document.c (new_document),
	tp/Texinfo/XS/parsetexi/api.c (reset_parser_except_conf, parse_file)
	(parse_text, parse_string, parse_piece),
	tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args)
	(end_line_starting_block, end_line_misc_line),
	tp/Texinfo/XS/parsetexi/errors_parser.c (line_error_internal),
	tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command),
	(handle_block_command), tp/Texinfo/XS/parsetexi/indices.c
	(add_index_internal, add_index, init_index_commands)
	(enter_index_entry, forget_indices, resolve_indices_merged_in),
	tp/Texinfo/XS/parsetexi/input.c (set_input_encoding, encode_file_name)
	(save_string), tp/Texinfo/XS/parsetexi/labels.c (register_label)
	(remember_internal_xref), tp/Texinfo/XS/parsetexi/macro.c
	(store_value, clear_value), tp/Texinfo/XS/parsetexi/parser.c
	(parsed_document, register_global_command)
	(wipe_parser_global_variables, rearrange_tree_beginning)
	(parse_texi_document, parse_texi), tp/Texinfo/XS/parsetexi/separator.c
	(handle_close_brace),
	tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (copy_tree):
	setup a document global variable named parsed_document early on in
	parsing functions, parse_file, parse_text, parse_string and
	parse_piece and use the document structure for information that end up
	in the document instead of using global variables that are stored at
	the end of parsing.  Add new_document to create an empty document
	and remove store_document, now unused.  Add a document_descriptor
	argument to rearrange_tree_beginning.  Rename wipe_parser_global_info
	as wipe_parser_global_variables.  Remove register_document,
	wipe_errors, forget_errors, forget_small_strings, free_small_strings,
	reset_labels, forget_labels, wipe_identifiers_target,
	reset_internal_xrefs and forget_internal_xrefs functions and
	parser_float_list, error_messages_list, global_info, index_names,
	small_strings, labels_list, identifiers_target, internal_xref_list and
	global_commands global variables as parsed_document is directly used.

2024-05-17  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_initialize_parsing, _enter_index_entry):
	replace restricted by NO_INDEX where needed.

2024-05-17  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_initialize_parsing): update parser
	initialization for NO_INDEX and NO_USER_COMMANDS.

	* tp/Texinfo/ParserNonXS.pm: remove close_paragraph_commands and
	close_preformatted_commands as states, as they never change.

2024-05-17  Patrice Dumas  

	* doc/texinfo.texi (Global Customization Variables),
	tp/Texinfo/Common.pm (%parser_options), tp/Texinfo/ParserNonXS.pm
	(%parser_inner_configuration, _new_macro, _parse_line_command_args),
	tp/Texinfo/Translations.pm (_replace_convert_substrings),
	tp/Texinfo/XS/main/translations.c (replace_convert_substrings),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser),
	tp/Texinfo/XS/parsetexi/Parsetexi.xs (conf_set_NO_INDEX)
	(conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/api.c,
	tp/Texinfo/XS/parsetexi/conf.c (conf_set_NO_INDEX)
	(conf_set_NO_USER_COMMANDS), tp/Texinfo/XS/parsetexi/conf.h (CONF),
	tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args),
	tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry),
	tp/Texinfo/XS/parsetexi/macro.c (new_macro),
	tp/Texinfo/XS/parsetexi/parser.c (parse_texi): add customization
	variables NO_INDEX to ignore index commands and NO_USER_COMMANDS
	to ignore @*macro, @alias, @def*index and @definfoenclose.  Replace
	restricted internal variable and associated variables and functions by
	setting those two variables for translations.

2024-05-17  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_initialize_parsing, get_parser_info)
	(parse_texi_file, _register_global_command, _enter_index_entry)
	(_end_line_misc_line, _end_line_starting_block)
	(_check_register_target_element_label, _handle_line_command)
	(_handle_block_command, _parse_texi, _parse_line_command_args),
	tp/Texinfo/Document.pm (new_document): setup the document in
	_initialize_parsing, by calling a new function in Texinfo::Document,
	new_document.  Associate the document to the parser as the document
	key.  Set directly in the document the information registered in the
	document in the parser.  Remove tp/Texinfo/Document.pm register
	function.

	* tp/Texinfo/ParserNonXS.pm (%parser_state_initialization)
	(%parser_document_state_initialization)
	(%parsing_state_initialization): split %parser_state_initialization
	in two.

2024-05-16  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm: fix a syntax error.

2024-05-16  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (%parser_state_initialization)
	(%parser_inner_configuration, %parser_state_configuration)
	(parser, _initialize_parsing, parse_texi_piece, parse_texi_text)
	(get_parser_info, _input_push_text, parse_texi_file, parse_texi_line)
	(_setup_conf):
	put input, some elements of global_info, definfoenclose,
	source_mark_counters, nesting_context, context_stack and
	context_command_stack in %parser_state_initialization.  Classify the
	parsing state keys.  Distinguish parser configuration initialization
	and parser parsing state initialization.  Add _initialize_parsing for
	parser parsing initialization.  Call it in parse_texi_* instead of in
	parser().  Split %parser_inner_configuration out of
	%parser_state_configuration.  Initialize $parser->{'conf'} in
	_setup_conf.

2024-05-15  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (parser), tp/Texinfo/Translations.pm
	(_replace_convert_substrings), tp/Texinfo/XS/parsetexi/Parsetexi.pm:
	if restricted is set, do the initialization as in simple_parser.
	Remove simple_parser, a parser with restricted set is equivalent.
	Update _replace_convert_substrings to call parser and set restricted.

2024-05-14  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (parse_texi_piece, parse_texi_line)
	(parse_texi_text, parse_texi_file),
	tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file)
	(parse_texi_piece, parse_texi_text, parse_texi_line): require a parser
	in argument of parse_texi_* instead of creating one if undef.  Do not
	export any function explicitly.

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm,
	Pod-Simple-Texinfo/pod2texi.pl, tp/t/accents.t,
	tp/t/automatic_nodes.t, tp/t/index_before_item.t,
	tp/t/protect_character_in_texinfo.t, tp/t/test_brace_count.t,
	tp/t/test_fill_gaps_in_sectioning.t, tp/t/test_is_content_empty.t,
	tp/t/test_protect_contents.t, tp/t/test_sort.t: update for need of
	parser in parse_texi_*.

2024-05-14  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (parser_set_debug),
	tp/Texinfo/XS/parsetexi/debug_parser.c (set_debug_output): return the
	previous value.

	* tp/Texinfo/XS/main/translations.c (replace_convert_substrings):
	reset better the configuration.  Call reset_parser_except_conf and not
	reset_parser.

	* tp/t/test_tree_copy.t: remove useless use.

2024-05-13  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/api.c (reset_parser_except_conf),
	tp/Texinfo/XS/parsetexi/input.c: remove input_reset_input_stack as
	it should never be useful.  There are debug messages in parse_texi
	if the input stack is not empty, if needed, the input stack variables
	could be reset there.

2024-05-13  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_is_index_element): use
	index_entry_commands instead of command_index.

	* tp/Texinfo/ParserNonXS.pm (simple_parser): do not set simple parser
	state hash reference if they are not used at all (for indices), or set
	directly to the default hashes if it is sure that they won't be
	modified.

2024-05-13  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_end_line_misc_line): add missing
	parenthesis.

	* tp/Texinfo/ParserNonXS.pm (_end_line_def_line): add missing
	definition command name with index.

	* tp/Texinfo/ParserNonXS.pm (%index_entry_command_commands)
	(_end_line_misc_line, _is_index_element, _process_remaining_on_line)
	(_parse_line_command_args, simple_parser, parser): do not use
	$self->{'command_index'} to determine if a command is an index
	command, add and use $self->{'index_entry_commands'}, for a clearer
	code more similar to C code.

2024-05-13  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_end_line_misc_line): use command names
	instead of %command_index for @*table commands and @def* commands
	with index entries names, for clearer a code, a code more similar to C
	and to avoid using %command_index for something else that associating
	an index to a command.

	* tp/Texinfo/ParserNonXS.pm (_parse_line_command_args),
	tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args): do not
	set synindex, syncodeindex and printindex arguments if in restricted
	parser.

	* tp/Texinfo/XS/main/translations.c (replace_convert_substrings): set
	restricted on the parser used for translations to be in restricted
	mode as if simple_parser had been called from Perl.

	* tp/Texinfo/XS/main/build_perl_info.c (build_index_data),
	tp/Texinfo/XS/parsetexi/indices.c (resolve_indices_merged_in)
	(complete_indices): handle the case of no indices at all.

	* tp/Texinfo/XS/parsetexi/api.c (reset_parser_except_conf),
	tp/Texinfo/XS/parsetexi/parser.c (parse_texi):

	* tp/Texinfo/XS/parsetexi/indices.c (init_index_commands)
	(forget_indices): set num_index_commands and number_of_indices to 0 in
	forget_indices only.

	* tp/t/init/translation_in_parser_in_translation.pm: test more
	index related functions in gdt/parse_texi_line.

2024-05-11  Patrice Dumas  

	Handle default index commands similarly to other @-commands

	* tp/Texinfo/ParserNonXS.pm (parser, simple_parser),
	tp/Texinfo/XS/parsetexi/indices.c (struct def, default_indices)
	(init_index_commands), tp/Texinfo/command_data.txt,
	tp/maintain/regenerate_commands_perl_info.pl: add default index
	commands to tp/Texinfo/command_data.txt like other builtin @-commands.

2024-05-11  Patrice Dumas  

	Update POD of index_entry extra key.

2024-05-11  Patrice Dumas  

	Update documentation POD with new organization of @def* trees.

2024-05-11  Patrice Dumas  

	* tp/Texinfo/XS/Makefile.am: remove an obsolete FIXME on libraries
	being searched for in libdir, as it is not the case (Gavin tests).

2024-05-11  Patrice Dumas  

	* tp/Texinfo/XS/Makefile.am (XSParagraph_la_SOURCES),
	tp/Texinfo/XS/xspara.c, tp/Texinfo/XS/xspara.h: use main/text.c.
	Remove Texinfo/XS/xspara_text.c and Texinfo/XS/xspara_text.h.

2024-05-11  Patrice Dumas  

	* tp/Texinfo/XS/main/text.c (text_alloc): inline fatal() call
	in order not to depend on utils.h.

	* tp/Texinfo/XS/main/utils.c (bug): change message.

	* tp/Texinfo/XS/xspara_text.c: remove unused text_destroy.

	Other minor changes in texts and comments.

2024-05-10  Patrice Dumas  

	* tp/Texinfo/XS/main/tree_types.h: remove now unused DEF_ARG.

2024-05-10  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/def.c (DEF_MAP, parse_def),
	tp/Texinfo/XS/parsetexi/end_line.c (end_line_def_line): remove
	arguments field from DEF_MAP, have parse_def return an array of
	ELEMENT and use the type of elements in end_line_def_line instead
	of a string.

2024-05-10  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_split_delimiters, _split_def_args)
	(_parse_def), tp/Texinfo/XS/parsetexi/def.c (split_delimiters)
	(split_def_args, parse_def): remove completly extra def_role from the
	tree now that definition line arguments container types are used
	instead.

2024-05-10  Patrice Dumas  

	* tp/Texinfo/Convert/DocBook.pm (%def_argument_types_docbook)
	(_convert), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert),
	tp/Texinfo/Convert/Utils.pm (definition_arguments_content)
	(definition_category_tree), tp/Texinfo/Translations.pm
	(complete_indices), tp/Texinfo/XS/main/convert_utils.c
	(definition_arguments_content, definition_category_tree),
	tp/Texinfo/XS/parsetexi/indices.c (complete_indices): use directly the
	type of definition line argument containers instead of def_role.

2024-05-10  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/def.c (parse_def): use definition line
	argument element type instead of role string to determine the type of
	argument on definition line.

2024-05-10  Patrice Dumas  

	* tp/Texinfo/Convert/TexinfoMarkup.pm (_convert),
	tp/Texinfo/ParserNonXS.pm (_parse_def, _end_line_def_line),
	tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/def.c
	(DEF_MAP, def_maps, parse_def), tp/Texinfo/XS/parsetexi/end_line.c
	(end_line_def_line): put definition line arguments in specific
	containers corresponding to the role on the definition line, as
	already in the extra def_role (in order to replace the extra def_role).

2024-05-09  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm
	(_convert_untranslated_def_line_arg_type, _convert),
	tp/Texinfo/Convert/LaTeX.pm (_convert),
	tp/Texinfo/Convert/Plaintext.pm (_convert),
	tp/Texinfo/Convert/TexinfoMarkup.pm (_convert),
	tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/ParserNonXS.pm
	(_next_bracketed_or_word_agg, _parse_def),
	tp/Texinfo/XS/convert/convert_html.c
	(convert_untranslated_def_line_arg_type, convert_to_html_internal),
	tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal),
	tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/def.c
	(next_bracketed_or_word_agg, parse_def): use def_line_arg for
	def_category and untranslated_def_line_arg instead of
	untranslated_def_category and put them directly on def line, to get
	the same tree as for other def line arguments.

2024-05-09  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_split_delimiters)
	(_next_bracketed_or_word_agg, _parse_def),
	tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/def.c
	(next_bracketed_or_word_agg) (split_delimiters, parse_def): rename
	def_aggregate type as def_line_arg type.

2024-05-09  Patrice Dumas  

	* tp/Texinfo/Convert/LaTeX.pm (%ignored_types, _convert),
	tp/Texinfo/Convert/Texinfo.pm (_convert_to_texinfo)
	(_expand_cmd_args_to_texi), tp/Texinfo/Convert/TexinfoMarkup.pm
	(_convert), tp/Texinfo/ParserNonXS.pm (_end_line_starting_block),
	tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi)
	(convert_to_texinfo_internal), tp/Texinfo/XS/main/element_types.txt,
	tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block): rename
	command_as_argument_inserted as command_as_argument and set info
	inserted instead. Remove %ignored_types in Texinfo.pm.

	* tp/Texinfo/Convert/LaTeX.pm (%ignorable_types): remove unused
	variable.

2024-05-09  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm
	(_convert_untranslated_def_category_type, _convert),
	tp/Texinfo/Convert/LaTeX.pm (_convert),
	tp/Texinfo/Convert/Plaintext.pm (_convert),
	tp/Texinfo/Convert/Texinfo.pm (@ignored_types)
	(_expand_cmd_args_to_texi), tp/Texinfo/Convert/TexinfoMarkup.pm
	(_convert), tp/Texinfo/Convert/Text.pm (_convert),
	tp/Texinfo/ParserNonXS.pm (_parse_def),
	tp/Texinfo/XS/convert/convert_html.c
	(convert_untranslated_def_category_type)
	(types_internal_conversion_table, convert_to_html_internal),
	tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi)
	(convert_to_texinfo_internal), tp/Texinfo/XS/main/convert_to_text.c
	(convert_to_text_internal), tp/Texinfo/XS/main/element_types.c
	(convert_to_text_internal), tp/Texinfo/XS/main/element_types.txt,
	tp/Texinfo/XS/parsetexi/def.c (parse_def): rename
	def_category_inserted as def_category and
	untranslated_def_category_inserted as untranslated_def_category
	and add the inserted information as an info integer.

2024-05-09  Patrice Dumas  

	* tp/Texinfo/XS/main/extra.c (add_info_integer)
	(lookup_key_pair_integer, lookup_extra_integer, lookup_info_integer):
	add add_info_integer and lookup_info_integer.

	* tp/Texinfo/Convert/Texinfo.pm (@ignored_types, _convert_to_texinfo),
	tp/Texinfo/ParserNonXS.pm (_split_def_args)
	(_next_bracketed_or_word_agg, _parse_def),
	tp/Texinfo/XS/parsetexi/def.c (next_bracketed_or_word_agg),
	tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi)
	(convert_to_texinfo_internal), tp/Texinfo/XS/main/element_types.txt,
	tp/Texinfo/XS/parsetexi/def.c (next_bracketed_or_word_agg)
	(split_def_args, parse_def): rename spaces_inserted as spaces and add
	the inserted information as an info integer.

2024-05-09  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_split_delimiters),
	tp/Texinfo/XS/parsetexi/def.c (split_delimiters): put text appearing
	along with delimiters in def_aggregate containers.

2024-05-09  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_split_delimiters)
	(_next_bracketed_or_word_agg, _parse_def),
	tp/Texinfo/XS/parsetexi/def.c (next_bracketed_or_word_agg)
	(split_delimiters, parse_def): put lone commands definition line
	arguments in a def_aggregate type container.  When parsing remaining
	arguments of a definition line, put everything that is not a lone
	bracketed_arg in a def_aggregate.

2024-05-07  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_parse_def),
	tp/Texinfo/XS/parsetexi/def.c (parse_def): put extra info
	documentlanguage and translation_context in
	untranslated_def_category_inserted element.

	* tp/Texinfo/Convert/HTML.pm
	(_convert_untranslated_def_category_inserted_type, _convert),
	tp/Texinfo/XS/convert/convert_html.c
	(convert_untranslated_def_category_inserted_type)
	(convert_table_definition_type, convert_to_html_internal),
	tp/Texinfo/Convert/LaTeX.pm (_convert),
	tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/Text.pm
	(_convert), tp/Texinfo/XS/main/convert_to_text.c
	(convert_to_text_internal): convert especially the
	untranslated_def_category_inserted element, performing the translation
	of the text string in contents, instead of directly converting the
	untranslated text element.

2024-05-07  Patrice Dumas  

	* tp/Texinfo/Convert/Texinfo.pm (@ignored_types),
	tp/Texinfo/Convert/TexinfoMarkup.pm (_convert),
	tp/Texinfo/ParserNonXS.pm (_parse_def),
	tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi)
	(convert_to_texinfo_internal), tp/Texinfo/XS/main/element_types.txt,
	tp/Texinfo/XS/parsetexi/def.c (parse_def): rename bracketed_inserted
	as def_category_inserted or untranslated_def_category_inserted if
	the category should be translated.

2024-05-07  Patrice Dumas  

	* doc/texi2any_api.texi (Setting the Context for Conversion):
	_converted type should only be text.

2024-05-05  Patrice Dumas  

	* configure.ac (Perl version and modules, tp-tests)
	(perl-api-texi-build, pod-simple-texinfo-tests): update Perl modules
	and version in checks.

	Add use Data::Dumper in files where it is used, comment out if not
	used.

2024-05-05  Patrice Dumas  

	Use use warnings instead of $^W

	* Pod-Simple-Texinfo/pod2texi.pl, tp/texi2any.pl, util/txixml2texi.pl:
	use use warnings instead of setting $^W.

2024-05-05  Patrice Dumas  

	Update use use.

	Replace require VERSION by use, do not use use vars, update use Perl
	version to be 5.006 if our is used, use use warnings instead of $^W.

	Remove %EXPORT_TAGS.

2024-05-05  Patrice Dumas  

	* doc/generate_html_doc_texi.pl: remove use re => '/a', there is no
	string manipulation in the code.

2024-05-05  Patrice Dumas  

	* tp/Texinfo/Convert/LaTeX.pm (_convert): leave content of
	before_defline as is directly in top level content.

2024-05-05  Patrice Dumas  

	* tp/Texinfo/Convert/DocBook.pm (%type_elements): leave content of
	before_defline as is without any element.

2024-05-05  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_gather_def_item),
	tp/Texinfo/XS/main/element_types.txt, tp/Texinfo/XS/parsetexi/def.c
	(gather_def_item): put content before @defblock and first @def*line in
	a before_defline container.

	* tp/Texinfo/Convert/DocBook.pm (%type_elements),
	tp/Texinfo/Convert/HTML.pm (%default_types_conversion),
	tp/Texinfo/Convert/LaTeX.pm (_convert),
	tp/Texinfo/Convert/TexinfoMarkup.pm (%type_elements),
	tp/Texinfo/XS/convert/convert_html.c
	(types_internal_conversion_table): update for before_defline.

	* util/texinfo.dtd: update for beforefirstdefline.

2024-05-05  Patrice Dumas  

	* tp/t/19def.t (@test_defblock): add full_document for LaTeX output
	tests.

2024-05-05  Patrice Dumas  

	* tp/Texinfo/XS/convert/convert_html.c (prepare_special_units)
	(html_default_format_heading_text, html_default_format_contents)
	(convert_style_command, convert_indicateurl_command)
	(convert_heading_command, convert_printindex_command)
	(convert_contents_command, convert_menu_entry_type)
	(contents_shortcontents_in_title): handle FORMAT_MENU MAX_HEADER_LEVEL
	CONTENTS_OUTPUT_LOCATION OPEN_QUOTE_SYMBOL CLOSE_QUOTE_SYMBOL
	MENU_SYMBOL INDEX_ENTRY_COLON MENU_ENTRY_COLON being undef, and thus
	NULL in C, in case they were reset to undef in Perl user-defined code
	after the beginning of the conversion.

2024-05-04  Patrice Dumas  

	* tp/maintain/regenerate_C_options_info.pl,
	tp/Texinfo/XS/main/option_types.h (global_option_type),
	tp/Texinfo/XS/main/utils.c, tp/Texinfo/XS/convert/converter.c:
	prefix global_option_type enums with GOT_ instead of GO_ to be able to
	add other global options enum.

2024-05-04  Patrice Dumas  

	* tp/Texinfo/XS/convert/ConvertXS.xs
	(get_converter_indices_sorted_by_index): initialize variables.

	* tp/Texinfo/XS/main/manipulate_indices.c (destroy_collator):
	call freelocale to deallocate resources associated with the locale
	created with newlocale.

2024-05-04  Patrice Dumas  

	* tp/Texinfo/Convert/Plaintext.pm (_convert): add a newline after
	generated menu if needed.

2024-05-04  Patrice Dumas  

	* tp/Makefile.tres, tp/t/19def.t (comment_index_before_defline)
	(text_block_before_defline): add test with content in @defblock before
	@defline.

2024-05-04  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_convert_def_command),
	tp/Texinfo/XS/convert/convert_html.c (convert_def_command): use
	directly defblock as class name.

2024-05-03  Patrice Dumas  

	* util/texinfo.dtd: add nodedescriptionblock and nodedescription.
	Fix defblock to allow definitionitem interspeded with defline.

2024-05-03  Patrice Dumas  

	* util/txixml2texi.pl: handle linemacro.

	* util/txixml2texi.pl (_encode): convert upon printing instead of
	using binmode, which is unreliable if not used right on when opening
	and never changing the filter.

2024-05-03  Patrice Dumas  

	* util/texinfo.dtd: add defbracketed, defblock, defline and
	deftypeline.

	* configure.ac (TEXINFO_DTD_VERSION): bump.

2024-05-03  Patrice Dumas  

	* tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): add an element for
	bracketed_arg not already associated to another element.

	* tp/Makefile.tres, tp/t/19def.t (bracketed_arg_no_space): add test
	for bracketed arguments not corresponding to one definition line
	argument.

	* tp/t/19def.t: convert @test_defblock to xml.

2024-05-03  Patrice Dumas  

	* tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): fix @inline*
	commands output to include inlinefmtifelse second argument.

	* tp/t/converters_tests.t (inlinefmtifelse_with_commands): update xml
	part of the test to have argument text content match the context.

	* tp/Makefile.tres, tp/t/xml_tests.t (inline_commands): add @inline*
	commands expansion test.

2024-05-03  Patrice Dumas  

	* tp/Texinfo/Indices.pm (setup_index_entry_keys_formatting): handle
	undefined OUTPUT_ENCODING_NAME.

2024-05-02  Patrice Dumas  

	* tp/Texinfo/XS/convert/convert_html.c
	(html_default_format_begin_file)
	(html_default_format_node_redirection_page): use empty string for
	PACKAGE_AND_VERSION and PACKAGE_URL if undefined.

	* tp/Texinfo/XS/convert/convert_html.c
	(default_format_special_body_about): add a new line.

2024-05-02  Patrice Dumas  

	* tp/Makefile.tres, tp/t/html_tests.t
	(info_js_dir_html_file_js_weblabels_file_undef): add a test with
	INFO_JS_DIR set and JS_WEBLABELS_FILE undef.

2024-05-02  Patrice Dumas  

	* tp/Makefile.tres, tp/t/html_tests.t (undef_split_and_big_rule): test
	with SPLIT and BIG_RULE undef.

2024-05-02  Patrice Dumas  

	* tp/Texinfo/Convert/DocBook.pm (converter_initialize): set
	OPEN_QUOTE_SYMBOL and CLOSE_QUOTE_SYMBOL if undef.

	* tp/Texinfo/Convert/LaTeX.pm (_convert),
	tp/Texinfo/Convert/Plaintext.pm (_convert): handle undef
	deftypefnnewline customization value.

	* tp/Makefile.tres, tp/t/converters_tests.t
	(conversion_with_undef_customization): add a test with many
	customization variables undef.

2024-05-02  Patrice Dumas  

	* tp/Makefile.tres, tp/t/converters_tests.t (extension_undef): add a
	test with EXTENSION undef.

2024-05-02  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (converter_initialize)
	(conversion_initialization): set FORMAT_MENU, MAX_HEADER_LEVEL,
	CONTENTS_OUTPUT_LOCATION, INDEX_ENTRY_COLON, MENU_ENTRY_COLON if
	undef in converter_initialize.  Set OPEN_QUOTE_SYMBOL,
	CLOSE_QUOTE_SYMBOL and MENU_SYMBOL if undef after setting the default.

	* tp/Texinfo/Convert/HTML.pm, tp/Texinfo/XS/convert/convert_html.c:
	allow documentlanguage, OUTPUT_ENCODING_NAME,
	NO_NUMBER_FOOTNOTE_SYMBOL, xrefautomaticsectiontitle, DEFAULT_RULE,
	deftypefnnewline, DOCTYPE, BODY_ELEMENT_ATTRIBUTES, AFTER_BODY_OPEN,
	PACKAGE_AND_VERSION, PACKAGE_URL, LINKS_BUTTONS, SECTION_BUTTONS in
	About body, JS_WEBLABELS_FILE, HANDLER_FATAL_ERROR_LEVEL to be undef.

	* tp/Texinfo/Convert/Info.pm (format_node): handle undef TOP_NODE_UP.

	* tp/Texinfo/Convert/HTML.pm (_default_format_special_body_about),
	tp/Texinfo/XS/convert/convert_html.c
	(default_format_special_body_about): different output for the About
	page if the SECTION_BUTTONS are undefined.

	* tp/Texinfo/XS/structuring_transfo/structuring.c
	(set_menus_node_directions), tp/Texinfo/XS/parsetexi/Parsetexi.pm
	(parser), tp/Texinfo/Convert/Plaintext.pm (_convert): handle undef
	FORMAT_MENU.

	* tp/Makefile.tres, tp/t/test_utils.pl (test), tp/t/10menu.t
	(format_menu_undef): add a test with FORMAT_MENU undef.

2024-05-01  Patrice Dumas  

	* doc/texi2any_api.texi (Simple Navigation Panel Customization):
	comment out documentation of buttons specification that is not used in
	code nor tests.

2024-05-01  Patrice Dumas  

	Remove skipped test result.

2024-05-01  Patrice Dumas  

	* tp/Texinfo/ManipulateTree.pm (_protect_text),
	tp/Texinfo/Transformations.pm (_protect_hashchar_at_line_beginning):
	set the parent of brace_command_arg added for added glyph command
	elements.

2024-05-01  Patrice Dumas  

	Remove parent of @include or @setfilename source mark elements

	* tp/Texinfo/ParserNonXS.pm (_end_line_misc_line),
	tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line): remove parent
	of @include or @setfilename element removed from the tree and
	registered as source mark element.

	* tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/80include.t
	(include_in_removed_before_item): add test of @include in @table
	before_item after a comment that holds the source mark, with
	before_item removed from the tree.

	Report from Christoph.

2024-05-01  Patrice Dumas  

	Change in comments, minor changes in code.

2024-04-30  Patrice Dumas  

	* tp/Texinfo/Convert/Converter.pm (_id_to_filename), tp/ext/epub3.pm
	(epub_convert_image_command): handle BASEFILENAME_LENGTH being undef.

	* tp/Texinfo/Convert/HTML.pm (_default_format_button),
	tp/Texinfo/XS/convert/convert_html.c (html_default_format_button):
	handle from_element_direction return being undef.

	* tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/Convert/HTML.pm:
	handle undefined SPLIT.

	* tp/Texinfo/XS/convert/convert_html.c (from_element_direction):
	handle TOP_NODE_UP being undef.

	* tp/Texinfo/Convert/Plaintext.pm (converter_initialize): handle
	undefined FILLCOLUMN.

	* tp/ext/epub3.pm (epub_setup): use INFO_JS_DIR and JS_WEBLABELS_FILE
	if defined, enven if the empty string or 0.

2024-04-29  Patrice Dumas  

	* tp/maintain/regenerate_C_options_info.pl: add a better BUG message
	than the default Perl message for customization variable passed to C
	that should be an integer but is not.

2024-04-29  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_convert_footnote_command)
	(_default_format_element_footer, _prepare_special_units),
	tp/Texinfo/XS/convert/convert_html.c (prepare_special_units)
	(html_default_format_element_footer, convert_footnote_command),
	tp/Texinfo/Convert/Plaintext.pm (process_footnotes, _convert):
	compare footnotestyle customization value to 'separate' only and
	handle an undef value.

2024-04-29  Patrice Dumas  

	* tp/TODO: notes on possible optimization after looking at callgrind
	output for HTML output with C.

2024-04-29  Patrice Dumas  

	* tp/Texinfo/Config.pm (GNUT_get_stage_handlers),
	tp/Texinfo/Convert/HTML.pm (run_stage_handlers, output): sort handlers
	according to priority in GNUT_get_stage_handlers and return sorted
	stage handlers.  Pass sorted handlers to run_stage_handlers.  Call
	Texinfo::Config::GNUT_get_stage_handlers() in output().

2024-04-27  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_handle_other_command),
	tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command):
	check that an in_heading_spec command is in an heading_spec command by
	using the basic_inline_stack_on_line nesting_context.

	* tp/Makefile.tres, tp/t/57invalid_nestings.t
	(heading_commands_in_center, heading_commands_in_documentlanguage):
	move two tests from tp/t/02coverage.t.

	* tp/Makefile.tres, tp/t/57invalid_nestings.t
	(heading_separator_in_accent_command)
	thischapter_in_footnote_in_evenfooting)
	(thischapter_in_math_in_evenfooting): new tests of invalid nestings
	for in heading commands.

2024-04-22  Patrice Dumas  

	* tp/Texinfo/command_data.txt (nodedescription): add
	contain_basic_inline flag.

2024-04-21  Patrice Dumas  

	* tp/Texinfo/XS/parsetexi/parser.c (check_valid_nesting): fix
	condition on contain_plain_text NOBRACE_symbol and CF_in_heading_spec.

2024-04-21  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (%in_plain_text_commands),
	tp/Texinfo/XS/parsetexi/parser.c (check_valid_nesting): remove @| from
	commands valid in plain text, by adding a check on
	%in_heading_spec_commands.

	* tp/Texinfo/ParserNonXS.pm (%in_full_text_commands)
	(%in_basic_inline_commands): do not put in_heading_spec_commands in
	%in_full_text_commands, only in %in_basic_inline_commands such that
	they can only appear in some @-commands (style brace @-commands).

	* tp/Texinfo/XS/parsetexi/parser.c (check_valid_nesting): remove an
	impossible check of outer_flags & CF_heading_spec for a brace command.

	* tp/Makefile.tres, tp/t/02coverage.t (heading_commands_in_center)
	(heading_commands_in_documentlanguage): add tests of heading commands
	in non heading nor footing line command and in contain_plain_text
	command.

2024-04-20  Patrice Dumas  

	* Pod-Simple-Texinfo/README: explain how test_scripts/*.sh can be
	modified by a sed one liner to be usable when using Makefile.PL.

2024-04-20  Patrice Dumas  

	* Pod-Simple-Texinfo/pod2texi.pl (BEGIN): detect the case of a
	pod2texi command installed from Makefile.PL and in that case do not
	set any path.

	* Pod-Simple-Texinfo/README: explain that pod2texi.pl need to me
	copied before calling perl Makefile.PL.

	* Pod-Simple-Texinfo/test_scripts/*.sh: correct a comment.

2024-04-19  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_parse_htmlxref_files): warn if the
	htmlxref.cnf entry URL prefix is missing.

2024-04-19  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (_close_command_cleanup)
	(_handle_other_command): remove 'rows_count', instead use
	scalar(@{$parent->{'contents'}}), as in C code.

	* tp/Texinfo/XS/parsetexi/parser.c (reset_parser_counters),
	tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments),
	tp/Texinfo/XS/parsetexi/counter.c (counter_reset): add debugging
	messages optional argument in counter_reset, set for counters reset in
	reset_parser_counters.

	* tp/Texinfo/ParserNonXS.pm (_handle_close_brace),
	tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace),
	tp/Texinfo/XS/parsetexi/close.c (close_brace_command): in C,
	remove remaining_args in close_brace_command.  Do not
	remove 'remaining_args' in _handle_close_brace, both in Perl and C.

	* tp/Texinfo/XS/parsetexi/close.c (close_command_cleanup),
	tp/Texinfo/XS/parsetexi/counter.c (counter_remove_element): fix removal
	of row count_cells counter, by adding a new function,
	counter_remove_element that remove element counters anywhere in the
	counter list.  This is needed for rows as they are obtained from the
	bottom of the counter list, not from the top.

	* tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command):
	remove useless counter management code on row parent element that
	never get a counter.

2024-04-18  Patrice Dumas  

	* tp/Texinfo/Convert/Plaintext.pm (_align_lines): remove $bytes_count
	returned value, as it is not used.  Update caller.

2024-04-18  Patrice Dumas  

	* tp/Texinfo/XS/convert/convert_html.c: remove TODO already in
	Texinfo/Convert/HTML.pm.

	* tp/Texinfo/Convert/HTML.pm (_html_convert_convert)
	(_html_convert_output): change TODOs to NOTEs.

2024-04-18  Patrice Dumas  

	* tp/init/html32.pm (html32_convert_tab_command): move code around,
	remove comment.

2024-04-18  Patrice Dumas  

	* tp/Texinfo/XS/convert/ConvertXS.xs
	(get_converter_indices_sorted_by_index): check if locale language is
	set before caching the built Perl sorted index.

2024-04-18  Patrice Dumas  

	* tp/init/html32.pm (html32_convert_center_command): in string
	context, simply return the argument.

2024-04-18  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_convert_image_command),
	tp/Texinfo/XS/convert/convert_html.c (convert_image_command): if image
	is not found, do not check if in_multiple_conversions, as it should
	happen very rarely, but check that there is some 'source_info'.

	* tp/Texinfo/Convert/HTML.pm (_convert_raw_command),
	tp/Texinfo/XS/convert/convert_html.c (convert_raw_command): inline call
	of _noticed_line_warn and remove the function.

	* tp/t/html_tests.t (tex_expanded_in_caption_multiple_time),
	tp/Makefile.tres: add test with expanded @teex in HTML in caption,
	such as to have an expansion of raw format multiple times.

2024-04-17  Patrice Dumas  

	* doc/texi2any_api.texi (Other Dynamic Information),
	(in_multiple_conversions, _internal_command_text)
	(convert_tree_new_formatting_context, _noticed_line_warn)
	(_set_multiple_conversions, _unset_multiple_conversions): add an API
	to access to multiple_conversions.

	* tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides),
	tp/Texinfo/XS/convert/ConvertXS.xs (html_set_multiple_conversions)
	(html_unset_multiple_conversions, html_in_multiple_conversions),
	tp/Texinfo/XS/convert/build_html_perl_state.c
	(build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c
	(convert_tree_new_formatting_context, html_internal_command_text): XS
	interface for multiple_conversions.  Remove previous interface.

2024-04-17  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_internal_command_text)
	(convert_tree_new_formatting_context, _noticed_line_warn),
	tp/Texinfo/XS/convert/build_html_perl_state.c
	(build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c
	(noticed_line_warn, convert_tree_new_formatting_context)
	(html_internal_command_text, html_conversion_finalization),
	tp/Texinfo/XS/main/converter_types.h (CONVERTER): rename ignore_notice
	as multiple_conversions.

	* tp/ext/epub3.pm (epub_convert_image_command): use
	converter_line_warn instead of _noticed_line_warn, but note that
	multiple_conversions should be taken into account.

2024-04-17  Patrice Dumas  

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_accessorize),
	(_preamble): add a texinfo_generate_setfilename accessor to determine
	if a @setfilename is inserted in standalone manuals.

	* Pod-Simple-Texinfo/pod2texi.pl: add a --generate-setfilename option,
	pass to the POD parser.

2024-04-17  Patrice Dumas  

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
	(pod_title_to_file_name, protect_text): remove leading _ for functions
	used in pod2texi.pl.  Update callers.

2024-04-17  Patrice Dumas  

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (print_texinfo_errors),
	Pod-Simple-Texinfo/pod2texi.pl: move _print_texinfo_errors to
	Pod/Simple/Texinfo.pm and improve.  Update callers.

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_accessorize, new),
	Pod-Simple-Texinfo/pod2texi.pl: add a texinfo_debug accessor to the
	POD parser, and pass it from pod2texi.pl.

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
	(_normalize_texinfo_name): add debug level argument and use it to
	set debugging in Texinfo parser used for names normalizations and
	print errors and warnings.  Update callers.

2024-04-17  Patrice Dumas  

	* Pod-Simple-Texinfo/test_scripts/*.sh: use $PERL to use the same perl
	the XS modules were compiled against.

2024-04-16  Patrice Dumas  

	* Pod-Simple-Texinfo/Makefile.am (test_files, EXTRA_DIST),
	Pod-Simple-Texinfo/test_scripts/*.sh: add tests of pod2texi.pl, based
	on tests formerly in manual_tests.

2024-04-16  Patrice Dumas  

	* tp/Texinfo/XS/main/targets.c (add_element_to_identifiers_target):
	set is_target extra information.

	* tp/Texinfo/XS/main/targets.c (register_label_element): fix existing
	error label error condition.

	* tp/Makefile.tres, tp/t/transformations.t
	(insert_nodes_for_sectioning_commands): add the same test of
	insert_nodes_for_sectioning_commands transformation as in
	t/automatic_nodes.t, here with tree and error messages too.

2024-04-16  Patrice Dumas  

	* Pod-Simple-Texinfo/pod2texi.pl (_print_texinfo_errors)
	(_parsed_manual_tree): better formatting of error messages from
	Texinfo modules.

2024-04-16  Patrice Dumas  

	* Pod-Simple-Texinfo/pod2texi.pl (_parsed_manual_tree): set debugging
	output and get errors if debug is set.

	* Pod-Simple-Texinfo/pod2texi.pl: fix processing file debug message
	with $base_level == 0.

	* Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t (empty head2): add a test
	with empty =head2.

2024-04-16  Patrice Dumas  

	* tp/Texinfo/ParserNonXS.pm (%parser_state_initialization): initialize
	'internal_references'.

2024-04-16  Patrice Dumas  

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
	(_pod_title_to_file_name): remove end of lines.

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
	(_normalize_texinfo_name): return undef in case of parsing errors
	leading to an undefined document.  Update callers.

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm: change in comments.

	* Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t (end of line in L): new
	test.

2024-04-16  Patrice Dumas  

	* Pod-Simple-Texinfo/pod2texi.pl: minor change in code, change in
	comments.

2024-04-16  Patrice Dumas  

	* tp/Texinfo/Document.pm (get_conf): remove warning if options are
	initialized in get_conf call.  Add a TODO and a comment.

2024-04-16  Patrice Dumas  

	* tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
	(reference_to_arg_in_tree): use the tree document as document if no
	document is given in argument.

	* tp/Texinfo/XS/structuring_transfo/transformations.c
	(reference_to_arg_in_tree): cast the third modify_tree argument to
	void *.

2024-04-16  Patrice Dumas  

	* doc/texinfo.texi (@LaTeX{} Customization Variables),
	tp/Texinfo/Convert/LaTeX.pm (%defaults, _latex_header),
	tp/Texinfo/options_data.txt: add new customization variable
	LATEX_FLOATS_FILE_EXTENSION.

2024-04-15  Patrice Dumas  

	* tp/Texinfo/XS/structuring_transfo/transformations.c
	(reference_to_arg_internal): fix flag set for internal reference
	removal and set it only if an element was actually removed.

	* tp/Texinfo/XS/structuring_transfo/transformations.c
	(regenerate_master_menu): set the flag corresponding to modified
	internal references if needed.

	* tp/Texinfo/Transformations.pm (_reference_to_arg)
	(reference_to_arg_in_tree),
	tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
	(reference_to_arg_in_tree): add a document argument to
	reference_to_arg_in_tree and _reference_to_arg.  Remove removed
	reference command from document internal references.
	Update callers.

2024-04-15  Patrice Dumas  

	* tp/Texinfo/Common.pm (remove_from_array): add a simple function to
	remove the first occurence of an element in an array.

	* tp/Texinfo/Transformations.pm (regenerate_master_menu): use
	Texinfo::Common remove_from_array to remove the removed menu entries
	from the internal references list.

2024-04-15  Patrice Dumas  

	* tp/Makefile.tres, tp/t/transformations.t
	(regenerate_master_menu_with_menu_comment): add test of
	regenerate_master_menu with a menu comment at the end of the Top node.

	Change in comments and spacing.

2024-04-15  Patrice Dumas  

	* tp/Texinfo/XS/convert/converter.c
	(get_converter_indices_sorted_by_index)
	(get_converter_indices_sorted_by_letter),
	tp/Texinfo/XS/main/document.c (sorted_indices_by_index)
	(sorted_indices_by_letter): have sorted_indices_by_* return the
	full collation indices information, not only the sorted indices, such
	that the caller may know the language set in collation structure.
	In get_converter_indices_sorted_by_*, get the language from
	sorted_indices_by_* collation indices information and pass it through
	an argument pointer reference.
	Update callers.

	* tp/Texinfo/XS/main/get_perl_info.c
	(get_language_document_hv_sorted_indices),
	tp/Texinfo/XS/convert/ConvertXS.xs
	(get_converter_indices_sorted_by_index)
	(get_converter_indices_sorted_by_letter): cache sorted indices built
	as Perl data in Perl data, such as to build the perl data only once,
	not for every index.  The cached data is retrieved with
	get_language_document_hv_sorted_indices, which also creates the hash
	where the sorted indices are stored, if needed.

2024-04-15  Patrice Dumas  

	* tp/Texinfo/OutputUnits.pm (units_directions),
	tp/Texinfo/XS/main/output_unit.c (units_directions): replace the
	customization options argument by print_debug.  Update callers and set
	the print_debug argument from customization options.

2024-04-14  Patrice Dumas  

	* tp/Texinfo/XS/main/document_types.h, tp/Texinfo/XS/main/document.c
	(sorted_indices_by_index, sorted_indices_by_letter): remove
	F_DOCM_sorted_indices_by_*, it is not accurate and not useful.

	* tp/Texinfo/XS/convert/ConvertXS.xs: add comments on caching
	built perl convert sorted_indices_by_*.

2024-04-14  Patrice Dumas  

	* tp/Texinfo/XS/main/build_perl_info.c (BUILD_PERL_DOCUMENT_ITEM)
	(BUILD_PERL_DOCUMENT_LIST): change macro definition to have the full
	function name, as first argument, add a flagname argument to have the
	full flag name and use a string for keyname.  For improved
	searchability of the code.

2024-04-14  Patrice Dumas  

	* tp/Texinfo/XS/convert/ConvertXS.xs (html_register_footnote): use
	code more similar to get_perl_info.c find_element_from_sv, removing
	useless cases.

2024-04-14  Patrice Dumas  

	* tp/Texinfo/Document.pm (%XS_overrides),
	tp/Texinfo/XS/main/DocumentXS.xs: remove rebuild_document, document
	accessors should be used instead.

2024-04-14  Patrice Dumas  

	* tp/Texinfo/ManipulateTree.pm (normalized_menu_entry_internal_node)
	(normalized_entry_associated_internal_node, first_menu_node),
	tp/Texinfo/Structuring.pm: move functions, some previously internal,
	from Structuring.pm to ManipulateTree.pm.  Update callers.

	* tp/Texinfo/OutputUnits.pm, doc/tp_api/Makefile.am
	(texi2any_internals_dependencies), tp/Makefile.am (dist_modules_DATA),
	tp/Texinfo/Structuring.pm: move output units related functions from
	Structuring.pm to the new module Texinfo::OutputUnits.  Update
	callers.

2024-04-14  Patrice Dumas  

	* tp/Texinfo/Structuring.pm (new_detailmenu),
	tp/Texinfo/XS/structuring_transfo/structuring.c (new_detailmenu):
	rename new_master_menu as new_detailmenu, change also variables names.
	Update callers and variables names in callers.

2024-04-14  Patrice Dumas  

	* tp/Texinfo/Indices.pm: remove export of functions.

	* tp/Texinfo/*: fix import of modules related to indices.

	Update POD documentation and comments to explain better which method
	should be directly used and why there is no XS override for some
	functions.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/XS/main/convert_utils.c (output_files_open_out),
	tp/Texinfo/XS/convert/convert_html.c
	(convert_output_output_unit_internal, html_node_redirections): add an
	output argument to output_files_open_out as in Perl, to get the
	information that a file was reused.  Also, as in Perl, add the file
	path to opened_files only if not already there.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/XS/main/build_perl_info.c
	(build_output_files_opened_files): update for the change in Perl
	code by building a hash reference.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/XS/structuring_transfo/transformations.c
	(protect_hashchar_at_line_beginning_internal): define error_messages
	and options only where they are needed.

	* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm: use
	Texinfo::Transformations methods fully qualified.

2024-04-13  Gavin Smith 

	* README-hacking: use suppressions file for valgrind

2024-04-13  Patrice Dumas  

	* tp/Texinfo/XS/main/manipulate_tree.c (protect_colon)
	(protect_colon_in_tree, protect_comma, protect_comma_in_tree)
	(protect_node_after_label, protect_node_after_label_in_tree),
	tp/Texinfo/XS/structuring_transfo/structuring.c,
	tp/Texinfo/XS/structuring_transfo/transformations.c: move functions
	calling protect_text and modify_tree out of structuring.c and
	transformations.c to manipulate_tree.c.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/ManipulateTree.pm, tp/Texinfo/Common.pm,
	tp/Makefile.am (dist_modules_DATA), doc/tp_api/Makefile.am
	(texi2any_internals_dependencies), : move tree transformation
	functions depending on modify_tree from Texinfo/Common.pm to the new
	Texinfo/ManipulateTree.pm module.  Update callers.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/XS/structuring_transfo/structuring.c: make some functions
	static.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/Common.pm (locate_file_in_dirs): rename locate_init_file
	as locate_file_in_dirs.  Update callers.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/Common.pm (output_files_opened_files), tp/texi2any.pl
	(merge_opened_files): add NOTE in comment to note that paths are not
	normalized, such that paths with different path names referring to the
	same file will not be caugth as overwritting files and will not
	trigger warning messages.

2024-04-13  Patrice Dumas  

	* tp/tests/run_parser_all.sh: do not add a / at the end of $testdir,
	one is already added in all the uses if needed.

	* tp/Texinfo/Common.pm (output_files_opened_files), tp/texi2any.pl
	(merge_opened_files): merge opened files with merge_opened_files in
	texi2any.pl, not in output_files_opened_files,
	output_files_opened_files simply returns the opened_files hash
	reference.  Warn if a file is opened more than once in
	merge_opened_files.

	* tp/tests/Makefile.onetst, tp/tests/formatting/list-of-tests
	(reuse_macro_expand_file): test --macro-expand with the same name as
	output file.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/Common.pm (output_files_open_out),
	tp/Texinfo/Convert/HTML.pm (_do_jslicenses_file): have
	output_files_open_out return the information that a file that was
	already opened is opened again, which means overwritting.  Add a
	warning in the case that can actually happen, with js licenses file.

	* tp/tests/formatting/list-of-tests (js_license_reuse_output_file):
	test with js licences file overwritting an output file.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/Common.pm (output_files_initialize)
	(output_files_open_out, output_files_opened_files), tp/texi2any.pl
	(_exit, %opened_files, handle_errors): use a hash instead of an array
	for opened files, to avoid unlinking twice files opened (and closed)
	twice.

2024-04-13  Patrice Dumas  

	* tp/Texinfo/Common.pm, tp/texi2any.pl: change in comments for a more
	accurate description of duplicates in opened_files.

2024-04-12  Patrice Dumas  

	* tp/Texinfo/Convert/Text.pm: change in comments.

2024-04-12  Patrice Dumas  

	* tp/Texinfo/Convert/Text.pm (convert_tree, convert): fix
	implementations.  Use XS for convert similarly as in output.

	* tp/Makefile.tres, t/raw_text_converter.t: add test of raw text
	converter functions not called elsewhere.

2024-04-12  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_html_set_pages_files),
	tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files): add
	warnings when a paths is reset from or to a relative path for an
	existing file.
	
	Change in comments.

2024-04-12  Patrice Dumas  

	* tp/tests/README, tp/TODO: updates related to manual tests.

2024-04-12  Gavin Smith 

	* doc/texinfo.texi (Predefined Indices): texinfo.texi now has
	three indices, not two.

2024-04-11  Patrice Dumas  

	* tp/Texinfo/Indices.pm, tp/Texinfo/Structuring.pm: update POD
	documentation.

2024-04-11  Patrice Dumas  

	* tp/t/test_utils.pl: change a TODO to a NOTE.

2024-04-11  Patrice Dumas  

	Fix master menu generation with node in its own menus

	* tp/Texinfo/Common.pm (converter_or_registrar_line_warn),
	tp/Texinfo/Indices.pm: move _converter_or_registrar_line_warn from
	Indices.pm to Common.pm and rename as
	converter_or_registrar_line_warn.

	* tp/Texinfo/Structuring.pm (new_master_menu)
	(new_complete_menu_master_menu, _print_down_menus),
	tp/Texinfo/XS/structuring_transfo/structuring.c (print_down_menus)
	(new_master_menu, new_complete_menu_master_menu),
	tp/t/do_master_menu.t: add the list of up nodes in print_down_menus
	arguments and check if a child node is also an up node, to avoid
	infinite recursion.  Add error reporting arguments to
	print_down_menus, and to caller, new_master_menu and
	new_complete_menu_master_menu.  Update callers.

	* tp/Makefile.tres, tp/t/info_tests.t (recursive_down_menu): add a
	test for a node in its own menu with a master menu generation.

2024-04-11  Patrice Dumas  

	* tp/t/test_utils.pl (test): initialize test customization variables
	defaults with the same hash as in the main program,
	%Texinfo::Common::default_main_program_customization_options.

	* tp/Texinfo/Convert/Texinfo.pm (target_element_to_texi_label),
	tp/Texinfo/XS/main/convert_to_texinfo.c
	(target_element_to_texi_label): handle links to external nodes.

	* tp/Texinfo/Structuring.pm (complete_node_tree_with_menus),
	tp/Texinfo/XS/structuring_transfo/structuring.c
	(complete_node_tree_with_menus): no warning on menu and node
	directions mismatch if the node direction is to an external manual.

	* tp/t/*.t: update tests by changing node direction or menu,
	adding CHECK_NORMAL_MENU_STRUCTURE set to 0, and comments.

2024-04-10  Patrice Dumas  

	* tp/t/test_utils.pl (close_files): add a note explaining why this
	function is unlikely to be called.  Die if a file could not be closed.

2024-04-10  Patrice Dumas  

	* tp/Texinfo/Report.pm (new): remove the possibility to reuse an
	object.

	Update POD documentation.

2024-04-09  Patrice Dumas  

	* tp/texi2any.pl: call Texinfo::Convert::Texinfo->import().  Move code
	around.

	* tp/Texinfo/Document.pm: Update POD documentation.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Document.pm (%XS_overrides, register_document_options),
	tp/Texinfo/XS/main/DocumentXS.xs (register_document_options),
	tp/t/test_utils.pl (test), tp/texi2any.pl: rename register_options as
	register_document_options.  Pass a hash of customization variables to
	register_document_options, call get_customization_options_hash in the
	calling code.  Remove _XS_set_document_options.

	* tp/t/test_utils.pl (test): remove a useless setting of
	document_descriptor in document.

	Update POD documentation.

2024-04-08  Patrice Dumas  

	* tp/t/test_utils.pl (test): rename $main_configuration* variables as
	$test_customization*.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Document.pm (%XS_overrides),
	tp/Texinfo/XS/main/DocumentXS.xs (document_get_conf): add an XS
	override for Document.pm get_conf.

	* tp/t/test_utils.pl (test), tp/texi2any.pl: use $document to provide
	customization information.

2024-04-08  Patrice Dumas  

	* tp/t/test_utils.pl (test), tp/texi2any.pl: use $document as
	customization provider.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Transformations.pm (complete_tree_nodes_missing_menu)
	tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
	(complete_tree_nodes_missing_menu),
	tp/Texinfo/XS/structuring_transfo/transformations.c
	(complete_tree_nodes_missing_menu): use a document in argument and
	use it to get the customization information and root of Texinfo tree.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Transformations.pm
	(insert_nodes_for_sectioning_commands, regenerate_master_menu):
	use $document argument to get customization options, remove
	$main_configuration argument.  Update callers and XS interfaces.

	* Pod-Simple-Texinfo/pod2texi.pl: update for change in structuring and
	transformation interfaces with $main_configuration argument removed.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Structuring.pm (warn_non_empty_parts)
	(check_nodes_are_referenced, set_menus_node_directions)
	(complete_node_tree_with_menus, nodes_tree): use $document argument to
	get customization options, remove $main_configuration argument.
	Update callers and XS interfaces.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Document.pm (get_conf): add to use in pure Perl for the
	get_conf cutomization getting API useing options registerd in the
	parser. Remove options().

	* tp/Texinfo/Structuring.pm (sectioning_structure)
	(associate_internal_references),
	tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
	(associate_internal_references, sectioning_structure),
	tp/t/automatic_menus.t, tp/t/automatic_nodes.t,
	tp/t/convert_to_text.t, tp/t/do_master_menu.t, tp/t/test_tree_copy.t,
	tp/t/test_utils.pl (test), tp/texi2any.pl: use $document argument to
	get customization options, remove $main_configuration argument for
	sectioning_structure and associate_internal_references.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Common.pm (%XS_overrides), tp/Texinfo/Config.pm
	(get_customization_options_hash), tp/Texinfo/Document.pm
	(%XS_overrides, register_options, _XS_set_document_options): Replace
	register_XS_document_main_configuration by Texinfo::Document
	register_options.  register_options in turn call
	_XS_set_document_options for XS code.  Add
	get_customization_options_hash based on
	register_XS_document_main_configuration, but without the call to
	set_document_options, to get the options in one hash, call it from
	Texinfo::Document register_options.  Remove set_document_options from
	Texinfo/Common.pm and remove register_XS_document_main_configuration.
	Update callers.
	
	* tp/Texinfo/Document.pm (register_options, options): setup the
	'options' Perl document hash value to be the hash obtained from
	get_customization_options_hash.

	* tp/Texinfo/XS/main/DocumentXS.xs (set_document_options): change the
	order of the arguments.  Update callers.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Config.pm (GNUT_set_customization_default),
	tp/texi2any.pl, tp/t/test_utils.pl (test): rename
	GNUT_set_main_program_default as GNUT_set_customization_default and
	rename GNUT_initialize_config as GNUT_initialize_customization.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/XS/convert/build_html_perl_state.c
	(build_html_command_formatted_args): set arg_tree in perl hash.

	* tp/Texinfo/Convert/HTML.pm (_translate_names)
	(_reset_unset_no_arg_commands_formatting_context),
	tp/Texinfo/XS/convert/build_html_perl_state.c
	(build_html_translated_names), tp/Texinfo/XS/convert/convert_html.c
	(html_free_converter, reset_unset_no_arg_commands_formatting_context)
	(html_translate_names), tp/Texinfo/XS/main/converter_types.h
	(HTML_COMMAND_CONVERSION): rename no arg commands tree structure field
	as translated_tree.

2024-04-08  Patrice Dumas  

	* doc/texi2any_api.texi (Command Tree Element Conversion Functions),
	tp/Texinfo/Convert/HTML.pm (_convert_xref_commands, _convert),
	tp/Texinfo/XS/convert/build_html_perl_state.c
	(build_html_command_formatted_args),
	tp/Texinfo/XS/convert/convert_html.c (convert_xref_commands)
	(destroy_args_formatted, convert_to_html_internal),
	tp/Texinfo/XS/main/converter_types.h (HTML_ARG_FORMATTED),
	tp/init/html32.pm: rename tree field in tree element conversion
	formatted argument structure to arg_tree.

2024-04-08  Patrice Dumas  

	* tp/Texinfo/Config.pm: adapt comments and a variable name to being
	called by tests in the same was as by main program.

2024-04-07  Patrice Dumas  

	* tp/Texinfo/Config.pm Texinfo::MainConfig (new, get_conf, set_conf)
	(register_XS_document_main_configuration), tp/t/test_sort.t: remove
	the 'standalone' case, now that it is not used anymore.  Simplify the
	Texinfo::MainConfig object structure.

2024-04-07  Patrice Dumas  

	* tp/t/test_utils.pl (test): set main_configuration as in the main
	program, by setting up defaults, calling
	Texinfo::Config::GNUT_initialize_config before loading init files,
	calling Texinfo::MainConfig::new without arguments, and calling
	Texinfo::Config::GNUT_set_from_cmdline for options from test
	specification (+DEBUG).

2024-04-07  Patrice Dumas  

	* tp/t/test_utils.pl (test): separate better parser options and main
	configuration options used for structuring.  Setup main configuration
	later on.

	* tp/texi2any.pl: add a list of customization options actually
	used in main_configuration and where they are used in comments.

2024-04-07  Patrice Dumas  

	* doc/texi2any_api.texi: refer more to the reader as you.  Update for
	changes in the Texinfo manual, to avoid some redundancy, and link to
	the appropriate section.

2024-04-07  Patrice Dumas  

	* doc/texinfo.texi (Specific Customization of HTML Formatting): remove
	a @subentry associated to an @item.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (HTML Output Structure Customization): add
	a definition of output units and an expanded description of the effect
	of USE_NODES.

	* doc/texinfo.texi (Customization Variables for Multiple Formats):
	define output units when describing the effect of setting USE_NODES.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi: add @subentry @r{for HTML} for customization
	variables index entries for variables that are not only for HTML.

	* doc/texinfo.texi (File Names and Links Customization for HTML)
	(HTML Splitting): small changes.

2024-04-06  Gavin Smith 

	* tp/Texinfo/XSLoader.pm (XS_parser_enabled, XS_structuring_enabled)
	(XS_convert_enabled): New functions, in order to avoid repeating
	similar blocks of code checking environment variables.

	* tp/Texinfo/Common.pm, tp/Texinfo/Convert/ConvertXS.pm,
	tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/HTML.pm,
	tp/Texinfo/Convert/PlainTexinfo.pm, tp/Texinfo/Convert/Texinfo.pm,
	tp/Texinfo/Convert/Text.pm, tp/Texinfo/Document.pm,
	tp/Texinfo/Indices.pm, tp/Texinfo/IndicesXS.pm, tp/Texinfo/Parser.pm,
	tp/Texinfo/StructTransfXS.pm, tp/Texinfo/Structuring.pm,
	tp/Texinfo/Transformations.pm, tp/t/automatic_nodes.t,
	tp/t/html_tests.t, tp/t/protect_character_in_texinfo.t,
	tp/t/test_utils.pl, tp/texi2any.pl: Use the new functions.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (HTML Customization for Math): corrections.

2024-04-06  Patrice Dumas  

	* doc/refcard/txivarcheck (read_refman), util/txicustomvars: get
	customization variables from "Invoking \@command{texi2any}" node too
	in txivarcheck, and output program_cmdline_options and
	converter_cmdline_options in txicustomvars.

	* doc/refcard/txivarcheck (read_tp): filter out the 'SILENT'
	customization variable that is not interesting to document as it does
	nothing, and the customization variables starting with XS_ that are
	not documented on purpose.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (Other Formats Customization Variables): add
	default value of TXI_MARKUP_NO_SECTION_EXTENT.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (Customization Variables and Options): add index
	entries for customization variables in the table associating them with
	options.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (Customization Variables for Multiple Formats):
	explicit which formats are concerned by USE_NODES.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (Other Formats Customization Variables),
	tp/Texinfo/Convert/TexinfoMarkup.pm (_convert),
	tp/Texinfo/options_data.txt, tp/t/xml_tests.t: add a new customization
	variable, TXI_MARKUP_NO_SECTION_EXTENT, to be used in TexinfoMarkup.pm
	instead of USE_NODES to avoid multiple significations for USE_NODES.

2024-04-06  Patrice Dumas  

	* tp/Makefile.tres, tp/t/xml_tests.t ($sectioning_test)
	(sectioning_test_ref, sectioning_test_no_use_nodes): add test of
	USE_NODES set in Texinfo XML.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (Other Formats Customization Variables): new node
	for customization which apply to specific formats only, for formats
	without separate customization variables description section.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (Customization Variables): move 'Info and Plaintext
	Customization Variables' before 'LaTeX Customization Variables'.
	Update overall description of customization variables.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (Customization Variables for Multiple Formats):
	rename 'Other Customization Variables' as 'Customization Variables for
	Multiple Formats'.

2024-04-06  Patrice Dumas  

	* doc/texinfo.texi (Other Customization Variables)
	(HTML Customization Variables List): move NODE_NAME_IN_MENU to 'HTML
	Customization Variables List', as it is used in HTML only.

2024-04-06  Patrice Dumas  

	* tp/Texinfo/Common.pm (%parser_options): remove 'restricted' as it is
	an internal parser option.

2024-04-05  Gavin Smith 

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info):
	Remove $no_build argument.  Only call build_document if $no_store
	is set.  Callers updated.

2024-04-05  Patrice Dumas  

	* doc/texinfo.texi (Global Customization Variables)
	(Other Customization Variables): split 'Global Customization
	Variables' out of 'Other Customization Variables'.

2024-04-05  Patrice Dumas  

	* tp/Texinfo/Convert/Converter.pm (determine_files_and_directory),
	tp/Texinfo/Convert/Text.pm (output), tp/Texinfo/Convert/HTML.pm
	(_prepare_css): use a different variable for file name string bytes
	and file name character string.

	* tp/Texinfo/Convert/HTML.pm (_prepare_css): rename variables.

	* tp/t/test_utils.pl: change in comments.

2024-04-05  Gavin Smith 

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_line):
	Pass false $no_build argument in call to _get_parser_info as
	otherwise the $no_store argument does nothing.

2024-04-05  Gavin Smith 

	Remove optional $no_build argument.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_line)
	(parse_texi_text): Remove optional $no_build argument.
	* tp/Texinfo/Translations.pm, tp/t/test_utils.pl: Update calls.

2024-04-05  Gavin Smith 

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_piece):
	Remove optional $no_build argument.
	* tp/t/test_utils.pl: Update call to parse_texi_piece.

2024-04-05  Gavin Smith 

	XS parse_texi_file only returns handle for building tree on-demand

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file): Eliminate
	optional argument to decide whether to build the Perl information
	or not.  Always call _get_parser_info with $no_build set.

	* tp/Texinfo/Document.pm (%XS_overrides, %XS_structure_overrides):
	Eliminate %XS_structure_overrides, and do not depend on the
	TEXINFO_XS_STRUCTURE variable.

	* tp/texi2any.pl, tp/t/test_utils.pl:
	Remove extra argument in call to parse_texi_file.
	Pass argument to Texinfo::Document::tree to control whether tree
	is built, depending on the setting of TEXINFO_XS_STRUCTURE.

	* tp/t/protect_character_in_texinfo.t:
	Only call Texinfo::Document::rebuld_tree if TEXINFO_XS_STRUCTURE is on.

2024-04-04  Patrice Dumas  

	* tp/Makefile.tres, tp/t/formats_encodings.t
	(accented_character_in_file_name): add to the t/*.t test suite a file
	that is already tested in tp/tests/encoded/ and has an accented letter
	in the Texinfo input file name.

2024-04-04  Patrice Dumas  

	* tp/t/test_utils.pl (test): test if $document is undef to determine
	if the parsing failed.

2024-04-04  Gavin Smith 

	* tp/Texinfo/Common.pm (debug_print_tree):
	Output 'tree_document_descriptor' hash value to help with
	debugging use of XS code.

2024-04-04  Patrice Dumas  

	* tp/t/*.t, tp/t/test_utils.pl (test): move ENABLE_ENCODING setup in
	tests to the converter options, as it is not used in structuring
	anymore.

2024-04-03  Patrice Dumas  

	Rename BODYTEXT customization variable as BODY_ELEMENT_ATTRIBUTES

	* NEWS, doc/texinfo.texi (Customization of HTML Code Inserted)
	(HTML Customization Variables List), doc/texi2any_api.texi,
	tp/Texinfo/Convert/HTML.pm (%defaults, _file_header_information)
	(output), tp/Texinfo/XS/convert/convert_html.c
	(BEGIN_FILE_INFORMATION, destroy_begin_file_information)
	(file_header_information, html_default_format_begin_file)
	(html_default_format_node_redirection_page),
	tp/Texinfo/options_data.txt, tp/init/html32.pm b/tp/init/html32.pm,
	tp/t/init/t2h_singular.init: rename BODYTEXT customization variable as
	BODY_ELEMENT_ATTRIBUTES.  Change variable names and structure field to
	be consistent.

2024-04-03  Patrice Dumas  

	Remove USE_UP_NODE_FOR_ELEMENT_UP customization variable

	* NEWS, doc/texinfo.texi (Other Customization Variables),
	tp/Texinfo/Convert/HTML.pm (_set_variables_texi2html),
	tp/Texinfo/Structuring.pm (units_directions),
	tp/Texinfo/XS/main/output_unit.c (units_directions),
	tp/Texinfo/options_data.txt: remove USE_UP_NODE_FOR_ELEMENT_UP
	customization variable.  It would only be relevant if @top is not
	present, which should never be the case and is quite confusing as
	it does the reverse as the usual determination of direction based on
	chapter structuring commands.

2024-04-03  Patrice Dumas  

	Remove NO_USE_SETFILENAME customization variable

	* NEWS, doc/texinfo.texi (Other Customization Variables),
	tp/Texinfo/Convert/Converter.pm (determine_files_and_directory),
	tp/Texinfo/options_data.txt, tp/Texinfo/Convert/HTML.pm
	(_set_variables_texi2html): remove NO_USE_SETFILENAME customization
	variable.  There are other ways to set setfilename or output file name
	and the @setfilename can be removed from document.

2024-04-03  Patrice Dumas  

	* doc/texinfo.texi: update cross-references to customization variables
	nodes.

2024-04-03  Patrice Dumas  

	* doc/texi2any_api.texi: replace associated to with associated with.

2024-04-03  Patrice Dumas  

	Rename COMPLEX_FORMAT_IN_TABLE as INDENTED_BLOCK_COMMANDS_IN_TABLE

	* NEWS, doc/texinfo.texi (Specific Customization of HTML Formatting)
	(HTML Customization Variables List), tp/Texinfo/Convert/HTML.pm
	(%defaults, _convert_indented_command, _convert_preformatted_command),
	tp/Texinfo/XS/convert/convert_html.c (convert_preformatted_command)
	(convert_indented_command), tp/Texinfo/options_data.txt,
	tp/init/html32.pm: rename COMPLEX_FORMAT_IN_TABLE customization
	variable as INDENTED_BLOCK_COMMANDS_IN_TABLE.

2024-04-03  Gavin Smith 

	* doc/texinfo.texi (Customization of HTML Code Inserted) :
	Add information about "lang" attribute.

2024-04-03  Gavin Smith 

	* doc/texinfo.texi (Specific Customization of HTML Formatting):
	Move COMPLEX_FORMAT_IN_TABLE to the right place.

2024-04-03  Patrice Dumas  

	* info/scan.c (scan_reference_marker): If a file name component
	was read, allow what follows to be blank.  This supports cross
	references like '*note (manual)::'.

2024-04-02  Gavin Smith 

	* doc/texinfo.texi (Syntax Highlighting, HTML Xref):
	Add @nodedescriptions.  (The content of these is not particularly
	important, but it looks consistent in the menu in the parent node.)

2024-04-03  Patrice Dumas  

	* doc/texinfo.texi (HTML CSS, EPUB Output File and Directory)
	(Syntax Highlighting): add customization variables index entries in
	these nodes where the customization variables effect is described in
	the context of use.

2024-04-02  Patrice Dumas  

	* tp/Texinfo/Convert/Plaintext.pm (_convert): add a Top node in
	cross-ref when there is a file but no node, as the Texinfo Info reader
	cannot follow a cross-reference with a file but no node name.  Gavin
	report.

2024-04-02  Patrice Dumas  

	Remove AVOID_MENU_REDUNDANCY customization option

	* NEWS, doc/texinfo.texi (HTML Customization Variables List),
	tp/Texinfo/Convert/HTML.pm (%defaults, _convert_menu_entry_type),
	tp/Texinfo/XS/convert/convert_html.c (simplify_text_for_comparison)
	(convert_menu_entry_type), tp/Texinfo/options_data.txt: remove
	AVOID_MENU_REDUNDANCY customization variable.  The associated
	case is unlikely to happen, not important, and the user can easily
	avoid the need for the variable by leaving the menu description blank.

2024-04-02  Gavin Smith 

	* doc/texinfo.texi (EPUB HTML): Add a @nodedescription.  Make
	explicit that it is texi2any setting variables internally, not
	anything that the user needs to or can do.

2024-04-02  Gavin Smith 

	* doc/texinfo.texi (Customization of Navigation and Headers):
	Remove index entries for ACTIVE_ICONS and PASSIVE_ICONS.  This
	stops them being reported by "make vcheck" under doc/refcard.
	(They are reported because they are not listed in the main
	hashes in Texinfo/Options.pm that util/txicustomvars checks.)
	(HTML Output Customization): Add a @nodedescription.

2024-04-02  Gavin Smith 

	* doc/refcard/txivarcheck: Search more of the manual for
	customization variables.

2024-04-02  Patrice Dumas  

	* doc/texinfo.texi (File Names and Links Customization for HTML):
	Refer to the user of the program as "you".

	* doc/texinfo.texi (Customization of Navigation and Headers): use
	active voice.

2024-04-02  Patrice Dumas  

	* doc/texinfo.texi (File Names and Links Customization for HTML):
	Refer to the user of the program as "you".

2024-04-02  Patrice Dumas  

	* doc/texinfo.texi (HTML Output Structure Customization)
	(JavaScript Interface and Licenses): add the 'JavaScript Interface and
	Licenses' node from content formerly in 'HTML Output Structure
	Customization'.  Leave USE_NEXT_HEADING_FOR_LONE_NODE description in
	'HTML Output Structure Customization'.

	* doc/texinfo.texi (HTML Features Customization)
	(Customization of HTML Code Inserted): split 'General Customization of
	HTML Code' in two, with 'HTML Features Customization', containing the
	beginning of th eremoved node and COPIABLE_LINKS description and
	'Customization of HTML Code Inserted'.

	* doc/texinfo.texi (HTML Features Customization): add examples of
	DOCTYPE setting. Refer to the user of the program as "you". 

	* doc/texinfo.texi (Customization of HTML Code Inserted): explain how
	opening and closing quotes are formatted by using a @table.

2024-04-02  Patrice Dumas  

	* doc/texinfo.texi (HTML Customization for Math): Refer to the user
	of the program as "you".

	* doc/texinfo.texi: replace 'In the default case' by 'By default'.
	Gavin suggestion.

2024-04-02  Gavin Smith 

	* doc/texinfo.texi (HTML Customization Variables List):
	Shorten introductory text.

2024-04-02  Gavin Smith 

	* doc/texinfo.texi (HTML Customization Variables List):
	Move to a subsection of "HTML Output Customization".
	(Customization Variables): Reference node in new location.

2024-04-02  Gavin Smith 

	* doc/texinfo.texi (HTML Customization Variables List)
	(HTML CSS, HTML Output Structure Customization): Eliminate uses
	of "associate to", which is not correct English.

2024-04-01  Gavin Smith 

	* doc/texinfo.texi (HTML Output Customization):
	Refer to the user of the program as "you".

2024-04-02  Patrice Dumas  

	* doc/texinfo.texi (Command Index, Variables Index): do not
	merge variable index in general index, there are now many
	customization variables, a separate index is relevant.  Add 'Variables
	Index' node.

2024-04-02  Patrice Dumas  

	* doc/texinfo.texi (HTML Output Customization): rename
	'HTML Output Advanced Customization' as 'HTML Output Customization'.
	Gavin idea.

	* doc/texinfo.texi (HTML Customization Variables List)
	(HTML Customization for Math): move 'MathJax Customization Variables',
	'@command{latex2html} Customization Variables' and '@command{tex4ht}
	Customization Variables' to 'HTML Customization for Math'.

2024-04-01  Gavin Smith 

	Edits to manual

	* doc/texinfo.texi (HTML Output Advanced Customization)
	(HTML Output Structure Customization)
	(File Names and Links Customization for HTML)
	(Customization of Navigation and Headers)
	(General Customization of HTML Code)
	(Specific Customization of HTML Formatting):

	Refer to the user of the program as "you" in many places in order
	to be clearer as to semantic agency.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi (HTML Output Advanced Customization): add
	TEXI2HTML customization variable description.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi (Info and Plaintext Customization Variables)
	(Other Customization Variables): new node for Info and plaintext
	specific customization variables.

	* doc/texinfo.texi (HTML Customization Variables List): move
	TEXI2HTML to the 'HTML Customization Variables List' node.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi (HTML Customization Variables List): move
	EPUB_CREATE_CONTAINER_FILE, EPUB_KEEP_CONTAINER_FOLDER,
	HIGHLIGHT_SYNTAX and HIGHLIGHT_SYNTAX_DEFAULT_LANGUAGE to the 'HTML
	Customization Variables List' node.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi (Other Customization Variables): fix
	OPEN_QUOTE_SYMBOL numeric entity for HTML.

	* doc/texinfo.texi (General Customization of HTML Code): add
	CLOSE_QUOTE_SYMBOL and OPEN_QUOTE_SYMBOL for HTML customization
	description.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi: update internal references to use more the new
	HTML customization nodes.

	* doc/texinfo.texi (Customization of Navigation and Headers): add
	OUTPUT_ENCODING_NAME use description in the section.

	* doc/texinfo.texi (HTML Output Structure Customization)
	(File Names and Links Customization for HTML): minor corrections.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi (Menus): HTML menus are also automatically
	generated.

	* doc/texinfo.texi (EPUB HTML): minor change on customization
	variables used.

	* doc/texinfo.texi (HTML Output Structure Customization): add
	FORMAT_MENU nomenu to explanations.

	* doc/texinfo.texi: add index entries in HTML Customization nodes and
	references to those nodes.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi (Customization Variables)
	(HTML Output Advanced Customization): add the 'HTML Output Advanced
	Customization' node in 'Generating HTML' for the description of HTML
	customization variables use.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi (HTML Customization for Math): add a node for HTML
	customization for Math with more details.

2024-04-01  Patrice Dumas  

	* doc/texinfo.texi (HTML Customization Variables List): fix
	INDEX_ENTRY_COLON default.

	* doc/texinfo.texi (Specific Customization of HTML Formatting): add.

	* doc/texinfo.texi (General Customization of HTML Code): add
	OUTPUT_CHARACTERS.

	* doc/texinfo.texi (File Names and Links Customization for HTML): add
	index entries.  Add NODE_NAME_IN_MENU.

2024-03-31  Patrice Dumas  

	* doc/texinfo.texi (HTML Customization Variables List): mention that
	COPIABLE_LINKS are output for headings too.

	* doc/texinfo.texi (File Names and Links Customization for HTML)
	(Customization of Navigation and Headers)
	(General Customization of HTML Code): review.  Add USE_ISO and
	COPIABLE_LINKS description to 'General Customization of HTML Code'.

2024-03-30  Patrice Dumas  

	* doc/texinfo.texi (Customization of Navigation and Headers)
	(General Customization of HTML Code): add nodes describing HTML
	customization in a more pedagoical way.

	* doc/texinfo.texi (HTML CSS): add the information on CSS related
	customization variables directly in the 'HTML CSS' node.

2024-03-30  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_prepare_converted_output_info): avoid
	having _string the type of a container containing directly the content
	of another tree element.

	* tp/Texinfo/XS/convert/convert_html.c (convert_value_command): fix
	explanation argument.

2024-03-30  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_default_format_special_body_about):
	reorder code to be in the same order as C code, to get the same debug
	output.

2024-03-30  Patrice Dumas  

	* tp/Texinfo/Structuring.pm (units_directions): fix getting
	associated_section for NodeForward.  Fix one case of FastBack setting.

2024-03-30  Patrice Dumas  

	* tp/Texinfo/XS/structuring_transfo/structuring.c
	(new_complete_node_menu): call copy_contents instead of copy_tree on
	part argument.

	* tp/Texinfo/Convert/HTML.pm (_convert_printindex_command): call
	convert_tree instead of convert_tree_new_formatting_context for the
	reference part of seealso when there is no need for multiple pass.

	* tp/Texinfo/Convert/HTML.pm (_convert_value_command)
	(_default_format_program_string, _default_format_special_body_about),
	tp/Texinfo/XS/convert/convert_html.c
	(html_default_format_program_string, html_default_format_end_file)
	(convert_value_command, default_format_special_body_about): add/fix
	explanation argument for tree conversion functions.

	* tp/Texinfo/Convert/HTML.pm (_html_convert_output): add unit number
	in debug message, as in C.

	* tp/Texinfo/XS/convert/convert_html.c
	(html_get_css_elements_classes): simplify and comment out C specific
	debug message.

2024-03-30  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_convert_printindex_command),
	tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): do not
	setup a subentry tree for conversion with empty contents.

	* tp/Texinfo/Convert/HTML.pm (_convert_heading_command)
	(_convert_printindex_command, _convert_def_line_type)
	(_default_format_end_file, _default_format_node_redirection_page),
	tp/Texinfo/XS/convert/convert_html.c (html_default_format_end_file)
	(html_default_format_node_redirection_page, convert_heading_command)
	(printindex_letters_head_foot_internal, convert_printindex_command)
	(convert_def_line_type): add explanation argument to tree conversion.

	* tp/Texinfo/XS/convert/converter.c
	(register_normalize_case_filename): same debug message as in Perl.

	* tp/Texinfo/XS/main/convert_to_texinfo.c
	(root_heading_command_to_texinfo): also check that there are contents
	to set a tree for output.

2024-03-29  Patrice Dumas  

	* tp/Texinfo/XS/convert/convert_html.c
	(html_prepare_converted_output_info): call message_list_document_warn
	if the input_file_name is not set for missing title message as in
	Perl.

	* tp/Texinfo/Convert/HTML.pm (_prepare_converted_output_info): remove
	debug message of little use.

	* tp/Texinfo/Convert/HTML.pm (_convert),
	tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal):
	distinguish undefined text and empty text in debug message.

	* tp/Texinfo/XS/convert/converter.c (table_item_content_tree): keep
	information on definfoenclose original command name.

	* tp/Texinfo/XS/main/builtin_commands.c (element_command_name): treat
	especially internal commands corresponding to command classes,
	CM_index_entry_command and CM_definfoenclose_command.

	* tp/Texinfo/XS/main/errors.c
	(message_list_document_formatted_message): no warning with debug
	message as in Perl.

	* tp/Texinfo/XS/main/get_perl_info.c (get_line_message): fix condition
	to issue a warning.

2024-03-29  Patrice Dumas  

	* tp/Texinfo/Convert/Utils.pm (find_innermost_accent_contents): return
	undef for the inner accent command text element if there is no
	argument at all.  Update callers.

	* tp/Texinfo/Convert/HTML.pm (unit_is_top_output_unit)
	(_default_format_element_header): return 0 and not an empty string for
	better looking debug messages.

	* tp/Texinfo/Structuring.pm (unsplit): take into account the XS sub
	return.

	* tp/Texinfo/Structuring.pm (@relative_directions_order)
	(@file_directions_order, @all_directions_order)
	(print_output_unit_directions): use the same aorder as in C/XS for the
	output unit directions output message.

	* tp/Texinfo/Convert/Converter.pm (convert_accents),
	tp/Texinfo/Convert/HTML.pm (_convert_printindex_command)
	(_convert_def_line_type, _convert),
	tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command)
	(convert_def_line_type, convert_to_html_internal),
	tp/Texinfo/XS/convert/converter.c (convert_accents): add explanation
	argument to tree conversion functions calls.

	* tp/Texinfo/XS/convert/convert_html.c
	(html_default_format_element_header): actually output debug message.

	* tp/Texinfo/XS/convert/convert_html.c (direction_string)
	(convert_explained_command): correct and update debug messages.

2024-03-28  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (html_convert_css_string)
	(_reset_unset_no_arg_commands_formatting_context),
	tp/Texinfo/XS/convert/convert_html.c (html_convert_css_string)
	(reset_unset_no_arg_commands_formatting_context): set the string
	context directly instead of using a type _string in Perl.  In C, call
	html_set_string_context.  Call html_open_command_update_context and
	html_convert_command_update_context in C for
	reset_unset_no_arg_commands_formatting_context preformatted context,
	as in Perl.

2024-03-28  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (@global_directions): use the same order
	as in C code HTML_GLOBAL_DIRECTIONS_LIST.

	* tp/Texinfo/XS/convert/convert_html.c
	(html_prepare_conversion_units): do not call
	set_global_document_commands on contents commands, as it is already
	done in Perl.

2024-03-28  Patrice Dumas  

	* tp/Texinfo/XS/convert/convert_html.c
	(html_default_format_element_footer): use TOP_FOOTER_BUTTONS.

2024-03-27  Patrice Dumas  

	* tp/Texinfo/XS/main/debug.c (debug_protect_eol): protect all the
	newlines and do not truncate the string at the first newline.

	* tp/Texinfo/XS/parsetexi/source_marks.c (source_marks_names): fix
	source marks name table.

	* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser): call parser_set_debug
	even if DEBUG is undef.

	* tp/Texinfo/XS/parsetexi/parser.c (parse_texi),
	tp/Texinfo/XS/parsetexi/input.c (next_text): add after_end_fetch_nr to
	diagnose cases of text being demanded after having reached once the
	end of input, as in Perl.

	* tp/Texinfo/XS/main/translations.c (replace_convert_substrings): add
	same error message as in Perl.

2024-03-26  Patrice Dumas  

	* doc/texinfo.texi (HTML Customization Variables List): change in
	wording based on Gavin reports.

2024-03-26  Patrice Dumas  

	* doc/texinfo.texi (HTML Output Structure Customization)
	(File Names and Links Customization for HTML): more pedagogical
	presentation of HTML customization through customization variables.

2024-03-24  Patrice Dumas  

	* doc/texi2any_api.texi: minor changes.

	Changes in code comments.

2024-03-24  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (%html_default_commands_args): rename
	%default_commands_args as %html_default_commands_args.

	* doc/html_default_commands_args.texi, doc/Makefile.am
	(texinfo_TEXINFOS, TXI_MODULES_ENV, html_default_commands_args.texi)
	(EXTRA_DIST), doc/texi2any_api.texi, tp/Texinfo/Convert/HTML.pm,
	doc/generate_html_doc_texi.pl: generate texinfo table of HTML
	default commands args based on %html_default_commands_args from
	Texinfo/Convert/HTML.pm in the doc/html_default_commands_args.texi
	file and include in texi2any_api.texi.

	* doc/texi2any_api.texi, tp/init/documentation_examples.pm,
	tp/t/init_files_tests.t ($documentation_examples_text): add more
	examples, add examples in documentation_examples.pm.

2024-03-23  Patrice Dumas  

	* tp/init/documentation_examples.pm: use pl instead of de, with
	a maintained po_document translation.  Add use of
	texinfo_register_direction_string_info.

	* tp/t/init_files_tests.t ($documentation_examples_text)
	(documentation_examples, documentation_examples_texi2html): add a
	documentation examples init file use with texi2html style.

2024-03-23  Patrice Dumas  

	* tp/t/test_utils.pl (test): remove symbols added in init files
	at the end of a test.

2024-03-23  Patrice Dumas  

	* doc/texi2any_api.texi: corrections, add examples, move nodes.

2024-03-19  Patrice Dumas  

	* doc/texi2any_api.texi: move "Command Tree Element Opening Functions"
	after "Command Tree Element Conversion Functions".

	* doc/texi2any_api.texi (Text Tree Elements Conversion): add a
	subsection for text holding Texinfo tree elements.  Move "Text
	Formatting Context" to that subsection.

	* doc/texi2any_api.texi: more examples, fixes in text.

2024-03-19  Patrice Dumas  

	* doc/texi2any_api.texi: use $converter instead of $self.

	* doc/texi2any_api.texi: move format_button_icon_img and the whole
	content of "Directions@comma{} Links@comma{} Labels and Files"
	where it is used.

	* doc/texi2any_api.texi: move "Tree Element Opening Functions" after
	"Type Tree Element Conversion Functions". Add more examples.

	* tp/init/documentation_examples.pm: update.

	* tp/Texinfo/Convert/HTML.pm (get_element_root_command_element):
	rename $root_element as $output_unit.

2024-03-18  Patrice Dumas  

	* tp/Makefile.tres, tp/t/html_tests.t (anchor_on_vtable_item): add
	test with @anchor on @vtable @item line.  Based on a report of
	Georg-Johann Lay.

2024-03-17  Patrice Dumas  

	* doc/texi2any_api.texi: use $converter instead of $self.

	* doc/texi2any_api.texi (Formatting HTML Output): add and additional
	section level structure in the node.  Move some information
	from "Dynamic Conversion Information" on "Alignment and Multiple
	Expansion Contexts" and "Dynamic Converter Formatting
	Information".  Remove "Dynamic Conversion Information".

	* doc/texi2any_api.texi (Customization and Use of Formatting Functions),
	(Tree Element Conversion Customization, Output Units Conversion
	Functions): reorganize, add information previously in "Dynamic
	Conversion Information" and "Heading Commands Formatting", move
	"Opening and Closing Sectioning Commands Extent" content to "Heading
	Commands Formatting".

	* doc/texi2any_api.texi (Shared Conversion State): make it a chapter.

	* doc/texi2any_api.texi (Associating Information to an Output File):
	move to "Beginning and Ending Files".

	* doc/texi2any_api.texi (Conversion to Plain Text): new node based on
	the expansion of information in "Setting the Context for Conversion".

	* doc/texi2any_api.texi: some rewriting, add more examples.

2024-03-17  Patrice Dumas  

	* doc/texi2any_api.texi: reorganize, by adding "Formatting HTML
	Output" and "Error Reporting, Customization Variables and
	Paths Manipulation in User Defined Functions" and moving there
	information from "User Defined Functions", "Protection of
	URLs" and more generally "Mandatory Conversion Function Calls", which
	is removed.

2024-03-17  Patrice Dumas  

	* README-hacking: mention pod2man.

2024-03-17  Gavin Smith 

	* doc/texinfo.texi (@code{@@itemize}): Shorten discussion of
	moving index entries and comments.

2024-03-17  Patrice Dumas  

	* doc/texinfo.texi (Introducing Lists, @code{@@itemize}): use {} in
	examples with mark commands @itemize arguments.

	* doc/texinfo.texi (@code{@@bullet}, Click Sequences): remove text
	stating that mark commands @itemize arguments braces are normally
	omitted that are also of dubious interest.

2024-03-16  Patrice Dumas  

	Add TOP_FOOTER_BUTTONS customization variable

	* doc/texi2any_api.texi (Simple Navigation Panel Customization),
	tp/Texinfo/Convert/HTML.pm (%defaults, _default_format_element_footer)
	(_set_variables_texi2html), tp/Texinfo/options_data.txt,
	tp/init/book.pm: add a TOP_FOOTER_BUTTONS to be able to specify
	seprately the Top node/@top header and footer.

2024-03-16  Patrice Dumas  

	* tp/Texinfo/Convert/HTML.pm (_default_format_navigation_panel),
	tp/Texinfo/XS/convert/convert_html.c
	(html_default_format_navigation_panel),
	tp/Texinfo/XS/main/get_perl_info.c
	(html_get_button_specification_list),
	tp/maintain/regenerate_C_options_info.pl: handle a string passed for a
	buttons list customization variable.  Handle an undef buttons list in
	C.

	* tp/Texinfo/Convert/HTML.pm (_default_format_navigation_panel)
	(_default_format_navigation_header),
	tp/Texinfo/XS/convert/convert_html.c
	(html_default_format_navigation_panel)
	(html_default_format_navigation_header): return an empty string instead
	of an empty 
for navigation panel when the panel buttons is an empty string. Do not output an horizontal rule if there is no navigation panel. * tp/Makefile.tres, tp/t/layout.t (navigation_test_undef_top_buttons) (navigation_test_zero_top_buttons): tests of TOP_BUTTONS set to undef and set to '0'. 2024-03-15 Patrice Dumas * doc/texi2any_api.texi (Special Unit Body Formatting Functions): fix crossref node name. 2024-03-15 Patrice Dumas * doc/texi2any_api.texi: explain better the effect of some customization variables. Use @subentry. Other changes. 2024-03-15 Patrice Dumas * doc/texi2any_api.texi (CSS Customization, Customization of CSS Rules Imports and Selectors, Customizing the CSS Lines): move all the information related to CSS Customization to the same place, in the CSS Customization new node. 2024-03-15 Patrice Dumas * doc/texi2any_api.texi: replace 'element direction' by 'output unit direction' everywhere. Other changes and fixes. 2024-03-13 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_prepare_title_titlepage) (_html_convert_output, tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_title_titlepage, html_convert_convert) (html_convert_output): change arguments orders if it simplifies ignoring unused arguments in XS. Ignore unused arguments in XS. Update callers. 2024-03-13 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_convert) (html_convert_output): use directly C document associated to converter. Other minor changes. 2024-03-13 Patrice Dumas * tp/Texinfo/XS/convert/call_html_perl_function.c: remove conditions on self->hv and special_unit->hv that should never change. 2024-03-13 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (add_tree_to_build) (remove_tree_to_build): add functions to add/remove an element to self->tree_to_build. add/remove to tree_to_build only if self->external_references_number > 0. 2024-03-13 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS): fix message_list_document_* options. Update po files. 2024-03-13 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/main/tree_types.h: add const. * tp/Texinfo/XS/convert/convert_html.c (normalized_label_id_file): reorganize code, add const. * tp/Texinfo/XS/structuring_transfo/transformations.c (protect_first_parenthesis): reorganiza code, add const. 2024-03-12 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files): always return undef, as the return value is ignored if XS overrides are used for the conversion. 2024-03-12 Gavin Smith * doc/texinfo.texi (@itemize): Do not say that the argument has to "result in a single character in the Info file", as multiple characters do work fine as an argument. Remove description of what @bullet outputs in different output formats, for brevity. Move discussion of optional braces after the example. Move discussion of having at least one @item, index entries and comments, and blank lines after the example usage. 2024-03-12 Patrice Dumas No information to Perl if no Perl functions are potentially called * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_title_titlepage) (html_convert_convert, html_convert_output), tp/Texinfo/XS/convert/convert_html.c (html_convert_convert) (html_prepare_title_titlepage, html_convert_output): get output units descriptors from converter. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units), tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize), tp/Texinfo/XS/main/converter_types.h (CONVERTER): set a counter based on total Perl function references potentially called. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units) (html_prepare_units_directions_files) (html_prepare_output_units_global_targets) (html_prepare_converted_output_info, html_prepare_title_titlepage), tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_translate_names), tp/Texinfo/XS/main/build_perl_info.c (setup_output_units_handler): do not pass information to Perl if Perl functions are not called. 2024-03-12 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files), tp/Texinfo/XS/convert/convert_html.c (html_prepare_units_directions_files): get output units descriptors from converter. 2024-03-12 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units) (html_prepare_output_units_global_targets), tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element) (prepare_special_units, html_prepare_conversion_units) (set_special_units_targets_files) (prepare_associated_special_units_targets, html_internal_command_href) (html_prepare_conversion_units_targets) (html_prepare_output_units_global_targets) (html_prepare_units_directions_files), tp/Texinfo/XS/main/converter_types.h (CONVERTER) (enum output_units_descriptor_type): add output_units_descriptors to converter store all types of output units descriptors. Remove output_units_descriptors. Use that informaton to get output units descriptors instead of going through Perl. 2024-03-12 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): count the number of file_id_setting references actually set. 2024-03-12 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (HTML_FILE_ID_SETTING_NAMES_LIST, enum html_file_id_setting) (CONVERTER), tp/Texinfo/XS/convert/call_html_perl_function.c (call_file_id_setting_*): get the file_id_setting function references keys only once in html_converter_initialize_sv, store them in the converter. 2024-03-12 Patrice Dumas * tp/Texinfo/XS/convert/call_html_perl_function.c (call_file_id_setting_*): check if special_unit->hv exist after getting the function to call such that the Perl data may be rebuilt at that time. 2024-03-11 Patrice Dumas Count Perl functions used * tp/Texinfo/XS/convert/convert_html.c (register_type_conversion_function, register_type_open_function) (register_command_conversion_function, register_command_open_function) (register_output_unit_conversion_function) (register_special_unit_body_formatting_function) (html_converter_initialize): register_* return 1 if a function was registered. Setup counters of perl functions registerd and not replaced by C functions. * tp/Texinfo/XS/main/get_perl_info.c (html_get_button_specification_list), tp/Texinfo/XS/main/option_types.h (BUTTON_SPECIFICATION_LIST), tp/maintain/regenerate_C_options_info.pl: add and set counters of the number of functions used in buttons for directions, of type BIT_function, that are not default functions. Count for a BUTTON_SPECIFICATION_LIST and for all BUTTON_SPECIFICATION_LIST OPTIONS. 2024-03-11 Patrice Dumas * tp/t/test_utils.pl (test): collect Texinfo::Config::GNUT_initialize_config init files customization variables information return value and use it in converter options. * tp/t/init_files_tests.t (redefined_buttons_functions), t/init/redefined_buttons.pm, tp/Makefile.am (test_files), tp/Makefile.tres: add a test of redefinition of button formatting functions in init file. 2024-03-11 Patrice Dumas * Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm, tp/t/automatic_menus.t, tp/t/convert_to_text.t, tp/t/index_before_item.t, tp/t/reference_to_text_in_tree.t, tp/t/test_fill_gaps_in_sectioning.t, tp/t/test_tree_copy.t: call tree() to rebuild the tree from a document instead of using Texinfo::Document::rebuild_tree. * Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm: do not return the tree when its root is a container and is not modified by transformations. Use parse_texi_piece instead of parse_texi_text for pieces of Texinfo. 2024-03-10 Patrice Dumas * Pod-Simple-Texinfo/pod2texi.pl (_parsed_manual_tree) (_fix_texinfo_tree): comment out calls to Texinfo::Document::rebuild_document. * tp/Texinfo/XS/convert/ConvertXS.xs: comments for unused overrides. 2024-03-10 Patrice Dumas * po/Makevars (XGETTEXT_OPTIONS), tp/Texinfo/XS/main/errors.c (vmessage_list_line_error, message_list_command_warn) (pmessage_list_command_warn): add a translation context to vmessage_list_line_error. Add the pmessage_list_command_warn function with a translation context and continuation. Add a continuation argument for message_list_command_warn. Update callers. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_node_redirections), tp/Texinfo/XS/convert/convert_html.c (html_node_redirections): implement html_node_redirections and add an XS override. * tp/Texinfo/Convert/HTML.pm (_node_redirections): remove extension related ocde, it is not used. Rename $out_filename as $out_filepath. 2024-03-10 Patrice Dumas * tp/Texinfo/XS/main/document.c (destroy_document_information_except_tree): free document->parser_error_messages. * tp/Texinfo/XS/main/translations.c (replace_convert_substrings): show and clear parser error messages, not other document errors. 2024-03-10 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_node_redirections): use labels_list instead of labels_information. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files), tp/Texinfo/XS/convert/convert_html.c (html_reset_files_source_info) (html_free_files_source_info, html_destroy_files_source_info) (html_set_pages_files, html_reset_converter, html_free_converter), tp/Texinfo/XS/main/converter_types.h (FILE_SOURCE_INFO) (FILE_SOURCE_INFO_LIST, CONVERTER), tp/Texinfo/XS/main/utils.h: add files_source_info to converter, move FILE_SOURCE_INFO and FILE_SOURCE_INFO_LIST definition to converter_types.h. Use converter files_source_info in html_set_pages_files, add functions to reset and free FILE_SOURCE_INFO_LIST and use those functions in converter reset and free, instead of destroying the files_source_info in html_prepare_units_directions_files. 2024-03-10 Patrice Dumas * tp/t/automatic_nodes.t, tp/t/do_master_menu.t, tp/t/protect_character_in_texinfo.t, tp/t/test_protect_hashchar_at_line_beginning.t: comment out Texinfo::Document::rebuild_document calls, as it is not needed anymore. 2024-03-10 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units): setup the Perl Texinfo tree before building output units to Perl as output units refer to the root commands. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): allow element associated_unit hv not to be already set, in case the tree is rebuilt before the output units, while there are already output units in XS/C. 2024-03-10 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory), tp/Texinfo/Convert/Text.pm (output): remove useless calls to global_commands_information. 2024-03-10 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_node_redirections): move code related to node files redirections to a function, in particular to prepare for XS overriding. 2024-03-10 Patrice Dumas * tp/Texinfo/XS/convert/converter.c (copy_option): handle NULL source string. 2024-03-10 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_handle_line_command) (_handle_block_command): fix global commands state key. 2024-03-10 Patrice Dumas XS interface for Texinfo::Convert::Converter::set_global_document_commands * tp/Texinfo/Convert/Converter.pm (%XS_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_global_document_commands): add an XS interface for set_global_document_commands. 2024-03-10 Patrice Dumas Put dircategory_direntry in global_commands * tp/Texinfo/ParserNonXS.pm (_register_global_command) (_handle_block_command), tp/Texinfo/XS/main/document_types.h, tp/Texinfo/XS/main/utils.c (delete_global_info) (delete_global_commands), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command, handle_block_command), tp/Texinfo/XS/parsetexi/parser.c (store_document), tp/Texinfo/XS/main/command_data.awk, tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm (_info_header): put dircategory_direntry in global_commands. * tp/Texinfo/XS/main/DocumentXS.xs (document_global_information), tp/Texinfo/Document.pm (global_information), tp/Texinfo/XS/main/build_perl_info.c (build_global_commands) (document_global_information): remove optional argument of global_information. Remove build_global_info_tree_info. Update callers. 2024-03-10 Patrice Dumas Add setfilename value to global_info * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory), tp/Texinfo/Convert/Text.pm (output), tp/Texinfo/ParserNonXS.pm (get_parser_info), tp/Texinfo/XS/main/build_perl_info.c (build_global_info): add the setfilename text argument to global_info as it is used to determine output file name. 2024-03-09 Patrice Dumas Do not call rebuild_document * tp/texi2any.pl, tp/t/test_utils.pl (test): do not call rebuild_document, the document information should be built to Perl when called through the accessors. * tp/texi2any.pl: remove a useless call to labels_information. * t/test_utils.pl: remove a useless call to global_commands_information. * tp/Texinfo/Document.pm (global_information), tp/Texinfo/XS/main/DocumentXS.xs (document_global_information), tp/Texinfo/XS/main/build_perl_info.c (document_global_information), tp/texi2any.pl, t/test_utils.pl: add an argument to global_information/document_global_information such that only information that do not require building the Perl tree is returned if set. Similar to calling only get_document, called that way from the main program. 2024-03-09 Patrice Dumas * tp/Texinfo/Document.pm (%XS_structure_overrides) (setup_indices_sort_strings, indices_sort_strings), tp/Texinfo/XS/main/DocumentXS.xs (setup_indices_sort_strings), tp/texi2any.pl: add setup_indices_sort_strings that does the same as indices_sort_strings but does not return anything, to avoid building Perl data in XS if not needed. 2024-03-09 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): store associated_unit in element. * tp/Texinfo/XS/main/document.c (register_document_sections_list): fix document->modified_information flag used. * tp/Texinfo/Document.pm (labels_list), tp/Texinfo/Convert/HTML.pm (_set_root_commands_targets_node_files): add an interface for Document 'labels_list'. * tp/Texinfo/XS/main/DocumentXS.xs (document_tree): no warning if XS document is not found. * tp/Texinfo/XS/main/DocumentXS.xs (document_tree), tp/Texinfo/XS/main/build_perl_info.c (store_texinfo_tree): split store_texinfo_tree out of document_tree to be able to call build_texinfo_tree if needed. * tp/Texinfo/Document.pm (%XS_structure_overrides), tp/Texinfo/XS/main/DocumentXS.xs (document_global_information) (document_indices_information, document_global_commands_information) (document_labels_information, document_nodes_list) (document_sections_list, document_floats_information) (document_internal_references_information, document_labels_list), tp/Texinfo/XS/main/build_perl_info.c (BUILD_PERL_DOCUMENT_ITEM) (BUILD_PERL_DOCUMENT_LIST, document_global_information): add an XS override for document accessors. * tp/Texinfo/XS/convert/ConvertXS.xs (get_converter_indices_sorted_by_index) (get_converter_indices_sorted_by_letter), tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings): get index entries by calling document_indices_information. 2024-03-09 Patrice Dumas XS override for Texinfo::Document tree * tp/Texinfo/XS/main/DocumentXS.xs (document_tree), tp/Texinfo/Document.pm (%XS_structure_overrides, tree): add an XS override for Texinfo::Document tree. Add an optional argument to tree() to avoid building the Perl tree if only a handler on XS data is needed. * tp/texi2any.pl, tp/t/test_utils.pl (test): set the new argument of tree() when tree handler only is needed. 2024-03-09 Patrice Dumas Set document->modified_information when modified, unset when passed to Perl * tp/Texinfo/XS/main/DocumentXS.xs (set_document_global_info), tp/Texinfo/XS/main/build_perl_info.c (get_document, fill_document_hv), tp/Texinfo/XS/main/document.c, tp/Texinfo/XS/main/output_unit.c (split_by_node, split_by_section, unsplit), tp/Texinfo/XS/main/targets.c (add_element_to_identifiers_target), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs, tp/Texinfo/XS/structuring_transfo/structuring.c, tp/Texinfo/XS/structuring_transfo/transformations.c: set document->modified_information flags when set or modified in C; Remove the flags when passed to Perl document structure. 2024-03-08 Patrice Dumas * tp/Texinfo/Document.pm (indices_sort_strings), tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings), tp/Texinfo/XS/main/document.c (document_indices_sort_strings): remove prefer_reference_element argument, as the result is cached, therefore the first call prefer_reference_element argument only would be used. Also the possibility associated to that argument probably do not make much sense when doing a document indices_sort_strings. 2024-03-08 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_units) (_html_convert_convert, run_stage_handlers, _html_convert_output), tp/Texinfo/Structuring.pm (split_by_node, split_by_section) (_XS_unsplit, unsplit), tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_convert, html_convert_output), tp/Texinfo/XS/main/output_unit.c (split_by_node, split_by_section) (unsplit), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (split_by_node, split_by_section, unsplit): pass a document instead of a tree in argument. Update callers. 2024-03-08 Patrice Dumas * tp/Texinfo/XS/main/document_types.h (DOCUMENT): add a modified_information flags field to DOCUMENT to keep track of which information is passed to Perl. * tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings), tp/Texinfo/XS/main/document.c (document_indices_sort_strings): build Perl indices_sort_strings information only once based on a DOCUMENT modified_information flag, and cache the Perl indices_sort_strings information in the Perl document hash, as is done in Perl overriden code. 2024-03-07 Patrice Dumas * tp/Texinfo/XS/main/DocumentXS.xs, tp/Texinfo/XS/main/build_perl_info.c: remove pass_document_errors. * tp/Texinfo/XS/main/build_perl_info.c: move functions around. 2024-03-07 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (registrar), tp/Texinfo/XS/parsetexi/Parsetexi.pm (registrar): get self argument. * tp/Texinfo/XS/main/build_perl_info.c (pass_document_parser_errors_to_registrar), tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info), tp/Texinfo/XS/parsetexi/Parsetexi.xs (pass_document_parser_errors_to_registrar): pass directly document prser errors to registrar. Remove pass_document_parser_errors. 2024-03-07 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (errors), tp/Texinfo/XS/parsetexi/Parsetexi.pm (errors): add errors as the main way to get parser errors. Remove registered_errors. Update callers of registered_errors to call directly errors. * tp/Texinfo/ParserNonXS.pm (registrar), tp/Texinfo/XS/parsetexi/Parsetexi.pm (registrar): add Texinfo::Report registrar accessors to have the same interface as document, only currently used in a test. 2024-03-07 Patrice Dumas * tp/Texinfo/Document.pm (%XS_overrides, errors), tp/Texinfo/XS/main/DocumentXS.xs (document_errors), tp/Texinfo/XS/main/build_perl_info.c (add_formatted_error_messages) (pass_errors_to_registrar): override directly Texinfo::Document::errors. Rename pass_converter_errors as add_formatted_error_messages and return error_nrs and errors_warnings Perl references too. 2024-03-07 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_end_line_starting_block), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block): change warning message based on mailing list feedback. Use command_data in C. 2024-03-07 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (rebuild_document): do not clear the existing document HV. 2024-03-06 Patrice Dumas Get errors from XS independently of document build/rebuild * tp/Texinfo/XS/main/build_perl_info.c (pass_document_parser_errors), tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info), tp/Texinfo/XS/parsetexi/Parsetexi.xs (pass_document_parser_errors): pass XS parser errors through the pass_document_parser_errors XS interface and remove them from XS data. * tp/Texinfo/Document.pm (%XS_overrides, _XS_pass_document_errors) (errors), tp/Texinfo/XS/main/DocumentXS.xs (pass_document_errors), tp/Texinfo/XS/main/build_perl_info.c (pass_document_errors): pass directly XS errors to Perl through pass_document_errors independentely of document rebuild, and remove errors from XS data. * tp/Texinfo/XS/main/build_perl_info.c (get_document) (fill_document_hv): do not build parser nor document errors lists. * tp/Texinfo/Document.pm (%XS_overrides): remove XS interface for clear_document_errors. * tp/Texinfo/XS/parsetexi/Parsetexi.xs: remove clear_document_errors and clear_document_parser_errors XS interfaces. * tp/Texinfo/Document.pm (register): remove 'parser_registrar' field and $parser_registrar register function argument. Update caller. * tp/t/test_utils.pl (test): do not call indices_sort_strings early anymore, and do not call $document->errors() right after rebuilding document, now that there are no link between retrieving errors and building document to Perl. 2024-03-05 Patrice Dumas * doc/texinfo.texi (Command List): @bullet is often associated with @itemize, not @table. 2024-03-04 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_end_line_starting_block), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block): add a warning when a command as @itemize argument is a brace command, do not have braces and is not a mark (noarg) command. 2024-03-03 Gavin Smith * tp/Texinfo/XS/main/get_perl_info.c: Remove unnecessary #include. 2024-03-03 Patrice Dumas Update POD documentation. 2024-03-03 Patrice Dumas * Pod-Simple-Texinfo/pod2texi.pl (_parsed_manual_tree): update calls to Texinfo::Transformations and Texinfo::Structuring methods by removing registrar and using document when needed. 2024-03-03 Patrice Dumas * tp/t/test_protect_hashchar_at_line_beginning.t (run_test): store tree transformation error messags in document registrar. Use document error function to get errors and merge with parser registrar errors. 2024-03-03 Patrice Dumas Change name of registrar variables to clarify the type of registrar * tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_error_registrar): rename _get_error_registrar as _get_parser_error_registrar. 2024-03-03 Patrice Dumas * tp/t/test_utils.pl (test): use document registrar in tree transformation test. * tp/t/test_utils.pl (test): rename $registrar as $parser_registrar. 2024-03-03 Patrice Dumas * tp/Texinfo/Document.pm (_existing_label_error) (set_labels_identifiers_target) (register_label_element), tp/Texinfo/Transformations.pm (_new_node): pass registrar as argument of _existing_label_error and register_label_element. Set the argument in set_labels_identifiers_target as should be done for a parser, and in _new_node as a document. 2024-03-03 Patrice Dumas * tp/Texinfo/Document.pm (registrar), tp/Texinfo/Structuring.pm: add accessor for registrar. 2024-03-03 Patrice Dumas * tp/Texinfo/Structuring.pm (sectioning_structure), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (sectioning_structure): use a document in argument, to avoid the possibility to use the parser error registrar. Update callers. * tp/t/test_utils.pl (test): call Texinfo::Document::sorted_indices_by_index instead of Texinfo::Indices::sort_indices_by_index, in particular to use the document errors registrar more simply. 2024-03-03 Patrice Dumas Separate Parser and Document errors and registrars * tp/Texinfo/Document.pm (register), tp/Texinfo/XS/main/build_perl_info.c (get_document, fill_document_hv), tp/Texinfo/XS/main/document.c (register_document) (clear_document_parser_errors), tp/Texinfo/XS/main/document_types.h (DOCUMENT), tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info), tp/t/test_parser_registrar.t, tp/t/test_utils.pl (test), tp/texi2any.pl: add a separate Texinfo::Report error registrar in perl, and separate parser_error_messages ERROR_MESSAGE_LIST in C. Merge parser and document errors in texi2any.pl and test_utils.pl. Remove handle_document_errors in texi2any.pl as the code is inlined for the merging of errors in the main loop. 2024-03-03 Gavin Smith Remove some perl_only_* wrappers * tp/Texinfo/XS/main/build_perl_info.c (perl_only_xasprintf, perl_only_xvasprintf): Remove as wrappers, as it is likely that Perl does not define its own versions of these. It's not worth implementing them ourselves as this is not trivial to do, and they are not currently needed. * tp/Texinfo/XS/main/utils.c (non_perl_xasprintf, non_perl_xvasprintf): Add. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_index_entries_sorted_by_letter): Replace calls to perl_only_xasprintf and perl_only_free with calls to non_perl_xasprintf and non_perl_free. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_translated_names): Replace call to perl_only_xasprintf with calls to perl_only_malloc and sprintf. 2024-03-03 Gavin Smith Reimplement perl_only_* wrappers * tp/Texinfo/XS/main/build_perl_info.c (perl_only_strdup, perl_only_strndup): Reimplement as it is likely that Perl does not define its own versions of these. 2024-03-03 Gavin Smith Consolidate "#undef free" comment. * tp/Texinfo/XS/XSParagraph.xs, * tp/Texinfo/XS/MiscXS.xs, * tp/Texinfo/XS/convert/ConvertXS.xs, * tp/Texinfo/XS/convert/build_html_perl_state.c, * tp/Texinfo/XS/convert/call_html_perl_function.c, * tp/Texinfo/XS/convert/get_html_perl_info.c, * tp/Texinfo/XS/main/api_to_perl.c, * tp/Texinfo/XS/misc.c, * tp/Texinfo/XS/parsetexi/Parsetexi.xs, * tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs, * tp/Texinfo/XS/xspara.c: Refer to comment in XSParagraph.xs for why we "#undef free" and expand on this comment. 2024-03-03 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.h (initialize_cmd_list): fix definition. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/convert/convert_html.c (new_special_unit_info_type): replace initialize_special_unit_info_type by new_special_unit_info_type. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/main/utils.c: use new_string_list. 2024-02-26 Patrice Dumas Wrappers around functions to avoid mixing Perl and non-Perl * tp/Texinfo/XS/convert/convert_html.c (initialize_cmd_list) (new_htmlxref_manual_list, initialize_js_categories_list) (initialize_jslicense_files, initialize_css_selector_style_list) (new_directions_strings_translated_type, new_directions_strings_type) (new_special_unit_formatting_references) (initialize_special_unit_info_type), tp/Texinfo/XS/convert/get_html_perl_info.c: add and use initialization functions, and use more wrappers. 2024-02-25 Patrice Dumas Homogenize the reference to the NOTE in build_perl_info.c 2024-02-25 Patrice Dumas Add wrappers around functions to avoid mixing Perl and non-Perl * tp/Texinfo/XS/convert/call_html_perl_function.h, tp/Texinfo/XS/main/utils.h (TARGET_CONTENTS_FILENAME, FILE_NAME_PATH) (TARGET_DIRECTORY_FILENAME): move to main/utils.h. * tp/Texinfo/XS/*/*.xs, tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_translated_names), tp/Texinfo/XS/convert/call_html_perl_function.c, tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/main/api_to_perl.c, tp/Texinfo/XS/main/build_perl_info.c (perl_only_free, perl_only_malloc, perl_only_strdup) (perl_only_strndup, perl_only_xvasprintf, perl_only_xasprintf), tp/Texinfo/XS/main/call_perl_function.c, tp/Texinfo/XS/main/get_perl_info.c, tp/Texinfo/XS/main/utils.c (non_perl_free, non_perl_strdup, non_perl_strndup, new_string_list) (new_target_filename, new_target_contents_filename, new_file_name_path) (new_target_directory_filename, new_formatted_button_info), tp/maintain/regenerate_C_options_info.pl: add and use wrappers for some of free, strdup, strndup, malloc, xvasprintf and xasprintf with Perl only variants defined in files including only Perl headers (no gnulib headers) and non Perl variants defined in files not including Perl headers. Also add constructors to call malloc in main/utils.c. 2024-02-25 Patrice Dumas * tp/Texinfo/XS/main/DocumentXS.xs, tp/Texinfo/XS/main/IndicesXS.xs, tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/call_perl_function.c, tp/Texinfo/XS/main/get_perl_info.c, tp/maintain/regenerate_C_options_info.pl: remove code avoiding redefinition by gnulib as gnulib headers are not included. Update comments. * tp/Texinfo/XS/Makefile.am (DocumentXS_la_L*, ConvertXS_la_LIBADD): add libgnu.la and $(LTLIBICONV) $(LTLIBUNISTRING) is not there for XS that are likely to use code related to those libraries. * tp/Texinfo/XS/Makefile.am (IndicesXS_la_CPPFLAGS): remove gnulib includes, they are not needed. 2024-02-25 Patrice Dumas * tp/Texinfo/XS/main/errors.c (message_list_line_formatted_message) (message_list_document_formatted_message) (vmessage_list_line_error, message_list_document_error_internal): call strdup in message_list_line_formatted_message and message_list_document_formatted_message directly when registering the message, and set const on the argument. Free the messages in vmessage_list_line_error and message_list_document_error_internal after registering them. This is so directly calling message_list_*_formatted_message does not require calling strdup. Add const. 2024-02-25 Gavin Smith Reset parsetexi counters * tp/Texinfo/XS/parsetexi/parser.c (reset_parser_counters): New. * tp/Texinfo/XS/parsetexi/api.c (reset_parser_except_conf): Call it. There were intermittent failures in the t/03coverage_braces.t definfoenclose_texinfo_commands test due to one of the counters not being reset. 2024-02-25 Gavin Smith Reset parsetexi counters * tp/Texinfo/XS/parsetexi/counter.c (counter_reset): New function. * tp/Texinfo/XS/parsetexi/macro.c: Call it on 'count_toplevel_braces'. 2024-02-25 Gavin Smith * tp/Texinfo/Document.pm (sorted_indices_by_letter, sorted_indices_by_index): Remove "registrar" argument. 2024-02-25 Patrice Dumas * tp/Texinfo/XS/convert/build_html_perl_state.c, tp/Texinfo/XS/main/build_perl_info.c (build_tree_to_build), tp/Texinfo/XS/main/call_perl_function.c (call_latex_convert_to_latex_math), tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal): move build_tree_to_build to build_perl_info.c. Use it in call_latex_convert_to_latex_math to rebuild the tree if needed. Prepare in convert_to_html_internal. Add const. 2024-02-25 Patrice Dumas * tp/Texinfo/Convert/Utils.pm (find_innermost_accent_contents), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents): take everything and do not nest if current accent command is tieaccent. * tp/Texinfo/XS/convert/convert_html.c (css_string_accent): call text_init early and once. Fixes in tieaccent code. * tp/Makefile.tres, tp/t/html_tests.t (itemize_tieaccent): add test of tieaccent in itemize argument. 2024-02-25 Patrice Dumas Add const. 2024-02-25 Gavin Smith Remove separate error registrar arguments * tp/Texinfo/Document.pm, tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings): * tp/Texinfo/Structuring.pm, tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (check_nodes_are_referenced, set_menus_node_directions) (complete_node_tree_with_menus, nodes_tree): Remove separate Texinfo::Report 'registrar' arguments, and access errors through 'registrar' key on Texinfo::Document arguments. 2024-02-25 Gavin Smith Remove separate error registrar argument * tp/Texinfo/Structuring.pm (warn_non_empty_parts), * tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs, (warn_non_empty_parts): Remove separate Texinfo::Report 'registrar' argument, and access errors through 'registrar' key on Texinfo::Document argument. 2024-02-25 Gavin Smith Remove separate error registrar argument * tp/Texinfo/Structuring.pm (associate_internal_references), * tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (associate_internal_references): Remove separate Texinfo::Report 'registrar' argument, and access errors through 'registrar' key on Texinfo::Document argument. 2024-02-25 Gavin Smith Remove separate error registrar argument * tp/Texinfo/Transformations.pm (insert_nodes_for_sectioning_commands, _new_node), * tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (insert_nodes_for_sectioning_commands), * tp/Texinfo/Document.pm (_existing_label_error) (_add_element_to_identifiers_target, register_label_element): Remove "registrar" argument and access errors through 'registrar' key on Texinfo::Document argument. 2024-02-24 Patrice Dumas Add const. Replace some int by size_t. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/main/manipulate_tree.c (add_source_mark): correct used sizeof. Allocate space one by one as more than one source mark in list is uncommon. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (set_file_source_info) (html_destroy_files_source_info, html_set_pages_files), tp/Texinfo/XS/main/utils.h (FILE_SOURCE_INFO): free filepath coming from user-defined file_id_setting unit_file_name function. Copy filepath in FILE_SOURCE_INFO. 2024-02-24 Patrice Dumas * tp/Makefile.am (test_files), tp/t/init/set_unit_file_name_filepath.pm, tp/Makefile.tres, tp/t/html_tests.t (set_unit_file_name_filepath): add test of unit_file_name user-defined file setting filepath. 2024-02-24 Patrice Dumas Add const. 2024-02-24 Gavin Smith Reference Texinfo::Report in Texinfo::Document object. * tp/Texinfo/Document.pm (register): Take an extra argument, a Texinfo::Report reference, and keep it in the 'registrar' value. * tp/Texinfo/XS/parsetexi/Parsetexi.pm: (_get_parser_info): Save reference to Texinfo::Document object in 'registrar' . * tp/Texinfo/ParserNonXS.pm (_parse_texi): Update call to "register". * tp/Texinfo/XS/main/build_perl_info.c (rebuild_document): Do not clear 'registrar' key on hash. * tp/Texinfo/Document.pm (errors): New function. Return errors, including any errors in the 'errors' array. Wipe 'errors' array after adding the errors to the Texinfo::Report object to allow calling multiple times. * tp/Texinfo/XS/parsetexi/Parsetexi.pm: (_get_parser_info): Wipe 'errors' array after propagating to Texinfo::Report. * tp/texi2any.pl (handle_document_errors, handle_errors) (_handle_errors): Add new function handle_document_errors to get errors from Texinfo::Document. * tp/t/test_parser_registrar.t, * tp/t/test_utils.pl: Call Texinfo::Document::errors instead of Texinfo::Report::errors. * tp/texi2any.pl, tp/t/test_utils.pl [XS structuring]: Eliminate loop copying errors with Texinfo::Report::add_formatted_message, as this is dealt with in Texinfo::Document::errors instead. 2024-02-24 Gavin Smith * tp/Texinfo/XSLoader.pm (init): Remove $warning_message and $fatal_message arguments. 2024-02-24 Gavin Smith * tp/Texinfo/Parser.pm: Always call Texinfo::XSLoader::init with "Texinfo::Parser" as the first argument. This is needed to call the import function loaded from Texinfo/ParserNonXS.pm. Undef the "Parsetexi" argument if TEXINFO_XS_PARSER is 0. * tp/Texinfo/XSLoader.pm (init): Check if argument giving the name of the Libtool file is undefined. Running with TEXINFO_XS_PARSER=0 was broken. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/parsetexi/input.c (input_push_text): call strdup in input_push_text for the value_flag instead of having it called by the caller. Make value_flag const. * tp/Texinfo/XS/parsetexi/input.c (input_push_file): add const. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/parsetexi/input.c (input_push_file): use save_string if needed on input filename to store the path in input_file_path. 2024-02-24 Patrice Dumas Add const. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/main/extra.c (add_extra_contents): replace the input list argument by no_lookup. If not set, first check that the array does not exist before creating it. Update callers. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/main/extra.c (add_extra_directions): check if the extra directions already exist and create them only if they do not exist. Update callers. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/main/extra.c (add_extra_directions): remove input element list argument, it is never set. Update callers. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/main/tree.c: remove now unused element_set_empty_contents. 2024-02-24 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (build_additional_info), tp/Texinfo/XS/main/extra.c (add_extra_directions) (lookup_extra_directions), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info, associate_info_references), tp/Texinfo/XS/main/tree.c (destroy_associated_info) (list_set_empty_contents): use ELEMENT_LIST for extra_directions. Update callers. 2024-02-23 Patrice Dumas Add const. 2024-02-23 Patrice Dumas * tp/Texinfo/XS/main/extra.c (add_extra_contents) (lookup_extra_contents): remove create argument of lookup_extra_contents. If value is 0, create a list in add_extra_contents. Return the list from add_extra_contents. Update callers. * tp/Texinfo/XS/main/extra.c (add_extra_directions) (lookup_extra_directions, lookup_extra_element): remove create argument of lookup_extra_directions. If value is 0, create an element in add_extra_directions. Do not accept extra_directions as a possible type for lookup_extra_element. Update callers and replace calls to lookup_extra_element for directions by calls to lookup_extra_directions. 2024-02-23 Patrice Dumas * tp/Texinfo/XS/convert/call_html_perl_function.c: replace G_ARRAY by G_LIST and use ppport.h which should provide compatibility. ppport.h do not proposes to include ppport.h, but it is likely that it is needed. * README-hacking: only propose to check the changes proposed by ppport.h, as it may be wrong. 2024-02-23 Patrice Dumas Remove/add ppport.h includes based on perl ppport.h output * README-hacking: add instructions on calling ppport.h. 2024-02-23 Patrice Dumas update ppport.h * README-hacking: add instructions on updating tp/Texinfo/XS/ppport.h. 2024-02-23 Patrice Dumas remove duplicate ppport.h file 2024-02-23 Gavin Smith Stop calling hv_fetch with null argument * tp/texi2any.pl: Avoid calling Texinfo::Document::remove_document with undef argument. * tp/Texinfo/XS/main/get_perl_info.c (get_document_or_warn): Check if hash obtained from argument is null. This is the case in test_scripts/formatting_info_extension_warning.sh. 2024-02-23 Gavin Smith * tp/t/test_parse_texi_line.t: invert order of Test::More::is test to put expected result second, not first. 2024-02-23 Patrice Dumas * tp/Texinfo/XS/main/manipulate_indices.c: add const. Remove TODOs. 2024-02-23 Patrice Dumas * tp/Texinfo/XS/main/manipulate_indices.c (INDEX_COLLATOR, setup_collator, destroy_indices_sortable_entries): remove INDEX_COLLATOR language field. 2024-02-23 Patrice Dumas * tp/Texinfo/XS/main/errors.c (message_list_document_error) (message_list_document_warn): add continuation argument. Update callers. 2024-02-23 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (prepare_index_entries_targets): remove test of index having entries as indices in sorted_index_names always have entries. 2024-02-23 Patrice Dumas * tp/Texinfo/XS/convert/get_html_perl_info.c (html_get_shared_conversion_state): check if index_nr is not 0. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/main/converter_types.h (SORTED_INDEX_NAMES), tp/Texinfo/XS/main/get_perl_info.c: add static and const. 2024-02-23 Patrice Dumas * tp/Texinfo/XS/main/node_name_normalization.c (convert_to_normalized_internal): change order of condition in if, change comments. 2024-02-23 Patrice Dumas * /tp/Texinfo/XS/convert/convert_html.c (prepare_index_entries_targets, html_initialize_output_state), tp/Texinfo/XS/main/converter_types.h (SORTED_INDEX_NAMES), tp/Texinfo/XS/main/get_perl_info.c (find_sorted_index_names_index_entry_extra_index_entry_sv), tp/Texinfo/XS/main/utils.c (index_number_index_by_name): keep only indices with entries in sorted_index_names. Have SORTED_INDEX_NAMES hold a list of INDEX pointers. Remove INDEX_NUMBER. 2024-02-22 Patrice Dumas * tp/Texinfo/XS/main/unicode.c (string_from_utf8): cast to char * before using strdup. * tp/Texinfo/XS/main/unicode.c (utf8_from_string, string_from_utf8): change comment to avoid compiler warning. 2024-02-22 Patrice Dumas * tp/Texinfo/XS/main/targets.c (existing_label_error) (register_label_element), tp/Texinfo/XS/structuring_transfo/transformations.c (new_node) (insert_nodes_for_sectioning_commands): use message_list_* functions in existing_label_error. Pass error_messages to existing_label_error through new_node and register_label_element. 2024-02-22 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_parse_texi), tp/Texinfo/Translations.pm (complete_indices), tp/Texinfo/XS/parsetexi/indices.c (complete_indices), tp/Texinfo/XS/parsetexi/parser.c (parse_texi): pass debug_level as complete_indices argument. Set debug_level in C for complete_indices based on debug_output. 2024-02-22 Patrice Dumas * tp/Texinfo/XS/main/translations.c (gdt, gdt_tree, pgdt_tree) (gdt_string), tp/Texinfo/XS/main/DocumentXS.xs (gdt): remove options argument, pass debug_level as argument. Update callers. 2024-02-22 Patrice Dumas * tp/Texinfo/Translations.pm (gdt, gdt_string): pass debug_level as an argument, change argument order, use customization_information as translate_string_method first argument only. Update callers. 2024-02-22 Patrice Dumas Update po files. 2024-02-22 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_parse_line_command_args): use the same messages as in C for definfoenclose related messages. 2024-02-22 Patrice Dumas Update po files. 2024-02-22 Patrice Dumas * tp/Texinfo/Convert/Utils.pm (@month_name): use Texinfo::Common::gdt to mark strings at the same time as filling @month_name. Update/change/remove some FIXME. 2024-02-22 Patrice Dumas * tp/Texinfo/Convert/Utils.pm (expand_today): use cdt with converter. 2024-02-22 Gavin Smith * README-hacking: Update which gnulib modules now depend on gperf. 2024-02-21 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (set_output_units_files), tp/Texinfo/Convert/Plaintext.pm (output): move output implementation out of Converter.pm to Plaintext.pm. Rename _set_output_units_files as set_output_units_files. * tp/Texinfo/Convert/Plaintext.pm (output): set $self->{'encoding_disabled'} if not outputting to a file, before any conversion is done. * tp/Texinfo/Convert/Plaintext.pm: move code around. 2024-02-21 Patrice Dumas * Pod-Simple-Texinfo/pod2texi.pl (_fix_texinfo_tree) (_parsed_manual_tree): update Texinfo::Document::rebuild_document call. 2024-02-20 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (output), tp/Texinfo/Convert/HTML.pm (_internal_command_href, _html_get_tree_root_element) (_html_set_pages_files, _prepare_special_units, _html_convert_convert) (output_internal_links, _html_convert_output), tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm (output), tp/Texinfo/Convert/Plaintext.pm (convert), tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element) (prepare_special_units, html_internal_command_href) (html_set_pages_files, html_convert_convert, html_convert_output): remove all the codes that are never run as they correspond to no output unit since output units are always set if split_by_* have been called. 2024-02-20 Patrice Dumas Fix memory leaks found with valgrind * tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line): free fullpath of verbatiminclude after adding to global_info included_files. * tp/Texinfo/XS/convert/convert_html.c (mini_toc_internal): set href after it is sure that the section is non empty and processed. 2024-02-20 Gavin Smith * tp/Texinfo/XS: Run "gnulib --remove-import uniconv/u8-strconv-to-enc" and "gnulib --remove-import uniconv/u8-strconv-from-enc" and "gnulib --remove-import uniconv/u32-strconv-from-enc". 2024-02-20 Gavin Smith * tp/Texinfo/XS/main/unicode.c (utf8_from_string, string_from_utf8): Replace calls to u8_strconv_from_encoding and u8_strconv_to_encoding with call to strdup followed by cast. (format_eight_bit_accents_stack): Replace call to u8_strconv_from_encoding with call to utf8_from_string. This eliminates the requirement for gnulib uniconv modules, which indirectly required the iconv_open module. 2024-02-20 Gavin Smith , and Patrice Dumas * tp/Texinfo/Convert/Plaintext.pm (convert): Set $self->{'encoding_disabled'} to 1 so that 'convert' will always return an unencoded character string. * tp/t/test_utils.pl (convert_to_plaintext, convert_to_info): Do not set OUTPUT_PERL_ENCODING to prevent encoding. * tp/Texinfo/Convert/Info.pm (output): Set $self->{'encoding_disabled'} if not outputting to a file, before any conversion is done. 2024-02-20 Patrice Dumas * tp/Texinfo/Document.pm (rebuild_document), tp/Texinfo/XS/main/DocumentXS.xs (rebuild_document), tp/Texinfo/XS/main/build_perl_info.c (fill_document_hv) (build_document, rebuild_document): distinguish building document and rebuilding an existing HV. Reuse the reference given as rebuild_document argument, do not return anything. Update callers of Texinfo::Document::rebuild_document. * tp/Texinfo/XS/main/build_perl_info.c (rebuild_output_units_list): add a debug message. * tp/Texinfo/XS/main/DocumentXS.xs (rebuild_tree): handle better no_store. * tp/Texinfo/XS/main/DocumentXS.xs: move code around. 2024-02-20 Patrice Dumas * tp/Texinfo/Structuring.pm (rebuild_output_units), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (rebuild_output_units): reuse the input reference instead of creating a new one. Do that by calling rebuild_output_units_list in XS. Do not return anything. Update callers. * tp/Texinfo/XS/convert/build_html_perl_state.c: make a function static, add const. * tp/Texinfo/XS/main/build_perl_info.c: move code around. * tp/Texinfo/Convert/Info.pm (output): move code around. Rename variables as output_unit*. * tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args): remove a useless TODO. 2024-02-20 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (fill_output_units_descriptor_av): inline fill_output_units in fill_output_units_descriptor_av. 2024-02-20 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (fill_output_units_descriptor_av, build_output_units_list) (rebuild_output_units_list): add fill_output_units_descriptor_av with code common to build_output_units_list and rebuild_output_units_list. 2024-02-20 Patrice Dumas Wrapper for u8_strconv_to_encoding * tp/Texinfo/XS/main/unicode.c (string_from_utf8): Create wrapper for u8_strconv_from_encoding to do the reverse of utf8_from_string. All callers of u8_strconv_from_encoding updated. Also replace some incorrect calls of utf8_from_string by string_from_utf8. 2024-02-20 Patrice Dumas * tp/Texinfo/XS/main/build_perl_info.c (output_unit_to_perl_hash) (fill_output_units, build_output_units_list) (rebuild_output_units_list): remove status, call fatal if an hv expected to be present is not there. 2024-02-19 Patrice Dumas * tp/Makefile.tres, tp/t/languages.t (documentlanguage_generated_master_menu): add test of generated master menu with @documentlanguage set. 2024-02-19 Gavin Smith Wrapper for u8_strconv_from_encoding * tp/Texinfo/XS/main/unicode.c (utf8_from_string): Create wrapper for u8_strconv_from_encoding. This simplifies the code that calls it as it is always called in the same way, with a "UTF-8" encoding specified, and allows potentially swapping out this implementation with e.g. a simple cast. All callers of u8_strconv_from_encoding updated. 2024-02-19 Patrice Dumas * tp/Texinfo/Structuring.pm (sectioning_structure), tp/Texinfo/XS/structuring_transfo/structuring.c (sectioning_structure): start appendix numbering only if at the top level. 2024-02-19 Patrice Dumas * tp/Makefile.tres, tp/t/10menu.t (part_appendix_in_generated_menu) (appendix_and_associated_part_in_generated_menu): add tests with part and appendices in generated top menu. 2024-02-19 Patrice Dumas * tp/Texinfo/Structuring.pm (new_complete_node_menu), tp/Texinfo/XS/structuring_transfo/structuring.c (new_complete_node_menu): use section to find associated part. 2024-02-19 Patrice Dumas * tp/Texinfo/Structuring.pm (_insert_menu_comment_content) (new_complete_node_menu, _print_down_menus), tp/Texinfo/Transformations.pm (complete_tree_nodes_menus), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (complete_tree_nodes_missing_menu), tp/Texinfo/XS/structuring_transfo/structuring.c (insert_menu_comment_content, new_complete_node_menu) (print_down_menus), tp/Texinfo/XS/structuring_transfo/transformations.c (complete_tree_nodes_missing_menu): Add comment lines in generated main menus for the start of the appendices or @part's. Add $customization_information argument for translations. Add insert_menu_comment_content for the comment insertion based on _print_down_menus code. Update callers. 2024-02-18 Patrice Dumas Only allow highlighting commands to be redefined with @definfoenclose * tp/Texinfo/ParserNonXS.pm (_parse_line_command_args), tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args): before redefining with definfoenclose, verify that the command is not a builtin command, or, if it is, that it is a brace command and a style* brace command. * tp/Makefile.tres, tp/t/03coverage_braces.t (definfoenclose_texinfo_commands): add tests of redefinition of builtin @-commands by @definfoenclose. 2024-02-18 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (_stream_encode): Set $self->{'encoding_disabled'} if no encoding is taking place. This avoids attempting to initialise $self->{'encoding_object'} each time this runs. Report from Patrice. 2024-02-18 Roland Clobus (tiny change) * install-info/install-info.c (compare_entries_text): If two strings compare identical, check which is longer. * install-info/tests/ii-0060-test: New test. This ensures reproducible results. See . 2024-02-18 Patrice Dumas * tp/Texinfo/XS/main/errors.c (message_list_line_formatted_message): change a translation context string as in Perl. Update po files. 2024-02-18 Patrice Dumas * tp/Texinfo/Report.pm (format_line_message): change a translation context string. * tp/Texinfo/Structuring.pm: set re => /a. Minor modifications of FIXME/TODO. 2024-02-18 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (url_protect_url_text) (url_protect_file_text), tp/Texinfo/XS/convert/convert_html.c (url_protect_url_text, url_protect_file_text): replace end of lines by spaces before percent encoding. 2024-02-18 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_heading_command), tp/init/book.pm (book_convert_heading_command): if USE_NODES = 0 and there are no sectioning commands, $output_unit->{'unit_command'} does not exist. 2024-02-18 Patrice Dumas * tp/Texinfo/Report.pm (format_line_message, line_warn, line_error): add a bug message if error_location_info argument is undef. 2024-02-18 Patrice Dumas * tp/Texinfo/Convert/HTML.pm: modify/remove FIXMEs. * tp/Makefile.tres, tp/t/converters_tests.t (sections_and_printindex): focused test of printindex with sectioning commands and converters called through convert. 2024-02-18 Patrice Dumas * tp/Texinfo/Convert/HTML.pm, doc/texi2any_api.texi: remove/handle FIXMEs. * tp/Makefile.tres, tp/t/html_tests.t (menu_in_documentdescription): add a test of menu in documentdescription, which leads to menu being formatted in string context. 2024-02-18 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_heading_command), tp/Texinfo/XS/convert/convert_html.c (convert_heading_command): update the condition used to determine if the node is used for heading. * tp/init/book.pm (book_convert_heading_command): avoid doing a sub toc for @top only if CONTENTS_OUTPUT_LOCATION is after_title. * tp/init/book.pm (book_convert_heading_command): sync with HTML.pm. 2024-02-17 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_contents_inline_element), tp/Texinfo/XS/convert/convert_html.c (contents_inline_element): change element-*contents class name to region-*contents. Not perfect, but better as element is better left for tree elements only. 2024-02-17 Patrice Dumas Add some const for *find_element_from_sv and similar functions. 2024-02-17 Patrice Dumas * main/utils.c (html_command_text_type_name): remove target. 2024-02-17 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_command_id): set return const. * tp/Texinfo/XS/convert/ConvertXS.xs: set const for elements returned by element_converter_from_sv. 2024-02-17 Patrice Dumas * doc/texi2any_api.texi (Element Direction Information Type), tp/Texinfo/Convert/HTML.pm (%valid_direction_return_type) (from_element_direction), tp/Texinfo/XS/convert/convert_html.c (from_element_direction), tp/Texinfo/XS/main/converter_types.h (enum html_text_type): remove the target direction information type of from_element_direction, it is not used anymore and it is in general better to get the href. 2024-02-17 Patrice Dumas * doc/texi2any_api.texi (Dynamic Converter Formatting Information), tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (current_output_unit), tp/Texinfo/XS/convert/ConvertXS.xs (html_current_output_unit), tp/Texinfo/XS/convert/convert_html.c (convert_output_unit), tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state): add a function accessor for convert_output_unit. Add an XS override for the. Do not pass current_output_unit through build_html_formatting_state anymore, the accessor function should be always be used instead. * tp/Texinfo/Convert/HTML.pm (_convert_printindex_command), tp/Texinfo/XS/convert/convert_html (convert_printindex_command): instead of calling from_element_direction('This', 'target'), call directly command_id on current_output_unit unit_command. 2024-02-17 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_contents_inline_element), tp/Texinfo/XS/convert/convert_html.c (contents_inline_element): remove code that was different before when called as convert, but should be the same now. * tp/Texinfo/XS/convert/convert_html.c: add const for command_id return variables when possible. 2024-02-17 Patrice Dumas * doc/texi2any_api.texi (Texinfo Tree Conversion Functions), tp/Texinfo/Convert/HTML.pm (convert_tree_new_formatting_context), tp/Texinfo/XS/convert/convert_html.c (convert_tree_new_formatting_context): make context string a mandatory argument. Reindent. 2024-02-17 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_default_format_special_body_about): reindent. 2024-02-17 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (direction_string), tp/Texinfo/XS/convert/convert_html.c (direction_string): do not access untranslated direction strings types for translated translations strings. * tp/Texinfo/Convert/HTML.pm (%default_converted_directions_strings): keep one empty direction string undef. * tp/Texinfo/Convert/HTML.pm (_default_panel_button_dynamic_direction) (_default_format_button, _default_format_special_body_about) (conversion_initialization), tp/Texinfo/XS/convert/convert_html.c (default_panel_button_dynamic_direction_internal) (html_default_format_button, default_format_special_body_about), tp/Texinfo/XS/convert/get_html_perl_info.c (html_conversion_initialization_sv): handle undef direction strings. * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/init_files_tests.t ($direction_strings_test_text) (directions_string_base, direction_strings_test_text) (directions_string_undef_texi2html), tp/t/init/directions_string_undef.pm: test directions strings undef. 2024-02-17 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%format_context_commands), tp/Texinfo/XS/convert/convert_html.c (html_format_init): do not set raw format block commands as format_context_command, it is not needed as they only contain raw text. * tp/Texinfo/Convert/HTML.pm (_file_header_information): do not output mathjax script if there was no math in the page. Changes in comments and indentation. 2024-02-16 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%default_shared_conversion_states) (_convert_listoffloats_command), tp/Texinfo/XS/convert/convert_html.c (convert_listoffloats_command, html_initialize_output_state) (html_reset_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_set_shared_conversion_state, html_get_shared_conversion_state), tp/Texinfo/XS/main/converter_types.h (HTML_SHARED_CONVERSION_STATE), doc/texi2any_api.texi (Shared Conversion State in Defaut Formatting): add listoffloats formatted_listoffloats shared state to record the number of time a listoffloat type was converted. 2024-02-16 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (html_convert_css_string), tp/Texinfo/XS/convert/convert_html.c (html_convert_css_string): make third argument mandatory and consider it to be a context string. Update html_convert_css_string in C to lead to the same context and explanation strings as in Perl. 2024-02-16 Patrice Dumas * tp/Texinfo/XS/convert/ConvertXS.xs (html_current_filename): handle non-ASCII filenames. * tp/Texinfo/Convert/HTML.pm (command_text, _file_header_information), tp/Texinfo/XS/convert/convert_html.c (html_command_text) (file_header_information): make sure that there is a non empty context string in the convert_tree_new_formatting_context call even if there is no command name. * tp/Texinfo/XS/main/utils.h: rename HMSF_converter_state as HMSF_ignore_notice. Update users. * tp/Texinfo/XS/convert/convert_html.c (convert_tree_new_formatting_context): use xasprintf and char * for context_string_str instead of TEXT. * tp/Texinfo/Convert/HTML.pm: reindent convert_tree_new_formatting_context calls to view more easily how many arguments there are and their values. 2024-02-16 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides): add missed override for footnote_location_href. * tp/Texinfo/Convert/HTML.pm (from_element_direction): use the current_filename function. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state): do not pass current_filename anymore, it is not needed, the current_filename function should be used instead. * tp/Texinfo/Common.pm (debug_print_element): remove useless end of lines. 2024-02-15 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (current_filename): set $self. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_current_filename): add XS override for current_filename. 2024-02-15 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (current_filename) (%available_converter_info): add a specific accessor to get the current_filename. Remove from %available_converter_info. Update callers of get_info('current_filename'). * doc/texi2any_api.texi: update. 2024-02-15 Patrice Dumas * doc/texi2any_api.texi: update. 2024-02-14 Patrice Dumas * tp/Texinfo/XS/main/manipulate_indices.c (get_sort_key) (setup_sortable_index_entries): do not uppercase sort strings in get_sort_key, as it is not right to do so for letters that are already uppercased. Instead uppercase sort string in setup_sortable_index_entries before calling get_sort_key. * tp/t/09indices.t ($encoding_index_text): add @ordf{} and @ordm{}, which are interesting to test as their uppercase representation is a lowercase letter. * tp/Texinfo/XS/main/manipulate_indices.c (print_bytes): add to help debugging. * tp/Texinfo/Indices.pm (sort_indices_by_letter): rename $entry_key as $sort_string. 2024-02-14 Gavin Smith * NEWS: minor tweaks 2024-02-14 Gavin Smith Document DOCUMENTLANGUAGE_COLLATION. * doc/texinfo.texi (Other Customization Variables): Document DOCUMENTLANGUAGE_COLLATION. (@documentlanguage): Reference DOCUMENTLANGUAGE_COLLATION. 2024-02-14 Patrice Dumas * tp/Texinfo/XS/main/manipulate_indices.c (setup_collator): warn if the collation_locale is not found. 2024-02-14 Patrice Dumas * tp/tests/other/index_collation_test.texi: modify test file to have the difference between strxfrm_l and Perl Unicode::Collate used in texi2any with Non-ignorable variable weighting show up in test output. * tp/tests/Makefile.onetst, tp/tests/other/list-of-tests (index_collation_test_collation_locale_en_US): test with XS_STRXFRM_COLLATION_LOCALE='en_US.utf-8' to find the collating locale on my Debian testing. 2024-02-14 Patrice Dumas * tp/tests/run_parser_all.sh (check_strxfrm_ok): skip test if TEXINFO_XS_CONVERT is not set or 0 and XS_STRXFRM_COLLATION_LOCALE is set. Change in spacing. 2024-02-14 Patrice Dumas * doc/texi2any_api.texi (Conversion General Information), tp/Texinfo/Convert/HTML.pm (%available_converter_info, get_info) (_convert_printindex_command, output_internal_links): remove 'index_entries_by_letter' from converter info, call directly get_converter_indices_sorted_by_letter instead, such that the current value of @documentlanguage can be used if it is used for tailoring the collation of indices. 2024-02-14 Patrice Dumas * tp/t/test_sort.t: call Texinfo::Document::indices_sort_strings instead of Texinfo::Indices::setup_index_entries_sort_strings for one of the two tests to this interface too. 2024-02-14 Patrice Dumas * tp/Texinfo/Document.pm (sorted_indices_by_letter) (sorted_indices_by_index), tp/Texinfo/XS/main/document.c (sorted_indices_by_letter, sorted_indices_by_index): set the document argument to be the first argument. Update callers. * tp/Texinfo/Indices.pm (_setup_sortable_index_entries): rename setup_sortable_index_entries as _setup_sortable_index_entries. * tp/Texinfo/XS/main/manipulate_indices.c: make internal functions static. Update POD documentation. 2024-02-14 Patrice Dumas * tp/Texinfo/Indices.pm (_setup_sort_sortable_strings_collator) (sort_indices_by_index, sort_indices_by_letter), tp/Texinfo/XS/main/manipulate_indices.c (setup_sort_sortable_strings_collator, sort_indices_by_index) (sort_indices_by_letter): require a document argument. Remove merged_index_entries and indices_information arguments, put document as first argument. Update callers. 2024-02-13 Patrice Dumas * tp/Texinfo/XS/main/document.c (new_collation_sorted_indices_by_index) (find_collation_sorted_indices_by_index, sorted_indices_by_index) (destroy_document_information_except_tree), tp/Texinfo/XS/main/document_types.h (INDEX_SORTED_BY_INDEX) (COLLATION_INDICES_SORTED_BY_INDEX, COLLATIONS_INDICES_SORTED_BY_INDEX) (DOCUMENT), tp/Texinfo/XS/main/manipulate_indices.c (destroy_indices_sorted_by_index, compare_sortable_index_entry) (sort_indices_by_index): implement index sorting by index. Separate compare_sortable_index_entry and functions called from qsort, compare_sortable_index_entry_refs and compare_sortable_index_entry_wrapper. * tp/Texinfo/XS/main/document.c (new_collation_sorted_indices_by_letter) (find_collation_sorted_indices_by_letter): Rename new_collation_sorted_indices and find_collation_sorted_indices to avoid ambiguity. * tp/Texinfo/Convert/Converter.pm (%XS_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (get_converter_indices_sorted_by_index), tp/Texinfo/XS/convert/converter.c (get_converter_indices_sorted_by_index), tp/Texinfo/XS/main/build_perl_info.c (build_sorted_indices_by_index): XS interface for sorted_indices_by_index through get_converter_indices_sorted_by_index. 2024-02-13 Patrice Dumas * tp/Texinfo/XS/convert/convert_html.c (html_reset_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER): no sorted index entries in converter anymore, they are in document. 2024-02-13 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (%XS_overrides) (get_converter_indices_sorted_by_letter), tp/Texinfo/XS/convert/ConvertXS.xs (get_converter_indices_sorted_by_letter), tp/Texinfo/XS/main/build_perl_info.c (build_sorted_indices_by_letter): override directly get_converter_indices_sorted_by_letter, find indices information in XS through perl hashes. Remove _XS_get_converter_indices_sorted_by_letter. Have build_sorted_indices_by_letter use HV in argument and return HV instead of SV. 2024-02-13 Patrice Dumas Use DOCUMENTLANGUAGE_COLLATION. * NEWS: update. * tp/Texinfo/Convert/Converter.pm (get_converter_indices_sorted_by_letter) (get_converter_indices_sorted_by_index), tp/Texinfo/XS/convert/converter.c (get_converter_indices_sorted_by_letter): add get_converter_indices_sorted_by_index. Handle DOCUMENTLANGUAGE_COLLATION. Return undef if there is no document or no index information. * tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Plaintext.pm (process_printindex), tp/init/chm.pm (chm_init): use get_converter_indices_sorted_by_index. 2024-02-13 Patrice Dumas * tp/Texinfo/XS/main/manipulate_indices.c (get_sort_key): use upper cased sort string to obtain the sort key for all the collation types. 2024-02-13 Patrice Dumas * tp/t/test_utils.pl (test): pass USE_UNICODE_COLLATION option. * tp/t/09indices.t (encoding_index_utf8_no_use_unicode), tp/Makefile.tres: add test of USE_UNICODE_COLLATION set to 0. * tp/tests/Makefile.onetst, tp/tests/other/Makefile.am (EXTRA_DIST), tp/tests/other/index_collation_test.texi, tp/tests/other/list-of-tests: add index_collation_test_plaintext, index_collation_test_collation_language, index_collation_test_collation_locale_en, index_collation_test_collation_locale_sv and index_collation_test_documentlanguage_collation to test all the cases of collation customization. 2024-02-12 Patrice Dumas * tp/Texinfo/XS/main/manipulate_indices.c: remove TODO, replace FIXME by TODO. 2024-02-12 Patrice Dumas * tp/Texinfo/Document.pm (indices_sort_strings), tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings), tp/Texinfo/XS/main/document.c (document_indices_sort_strings): change arguments order, to have document first. Update callers. * tp/Texinfo/XS/main/call_perl_function.c: remove get_call_index_entries_sorted_by_letter, which is not used anymore. 2024-02-12 Patrice Dumas * tp/Texinfo/options_data.txt (DOCUMENTLANGUAGE_COLLATION) (XS_STRXFRM_COLLATION_LOCALE): add customization variables. * tp/Texinfo/XS/main/call_perl_function.c (call_setup_collator) (call_collator_getSortKey), tp/Texinfo/XS/main/document_types.h (BYTES_STRING, enum collation_type_name), tp/Texinfo/XS/main/manipulate_indices.c (INDEX_COLLATOR, get_sort_key) (setup_collator, compare_byte_strings, compare_index_letter) (compare_sortable_subentry_keys), tp/Texinfo/XS/main/manipulate_indices.h (SORTABLE_INDEX_SUBENTRY): add an enum for the types of collations, and a structure for a collator. Add the possibility to call perl code to get a collator object and get Perl sort keys as a possibility for collation sort strings. Use bytes strings with length through the BYTES_STRING structure, to be able to use strings with NUL within as collation string keys. This is needed for collation keys coming from Perl and a logical structure in C for collation binary strings. Use memcmp to compare. * tp/Texinfo/XS/main/document.c (document_indices_sort_strings) (destroy_document_information_except_tree), tp/Texinfo/XS/main/document_types.h (INDEX_SUBENTRY_SORT_STRING) (INDEX_ENTRY_SORT_STRING, INDEX_SORT_STRINGS, INDICES_SORT_STRINGS) (DOCUMENT), tp/Texinfo/XS/main/manipulate_indices.c (destroy_index_entries_sort_strings), tp/Texinfo/XS/main/manipulate_indices.c (setup_index_entries_sort_strings, setup_sortable_index_entries) (setup_sort_sortable_strings_collator, sort_indices_by_letter): add setup_index_entries_sort_strings based on setup_sortable_index_entries code and add setup_sort_sortable_strings_collator, as in Perl. Add document_indices_sort_strings. * tp/Texinfo/XS/main/manipulate_indices.c (destroy_indices_sortable_entries): add. * tp/Texinfo/XS/main/document.c (new_collation_sorted_indices) (find_collation_sorted_indices, sorted_indices_by_letter) (destroy_document_information_except_tree), tp/Texinfo/XS/main/document_types.h (COLLATION_INDICES_SORTED_BY_LETTER) (COLLATIONS_INDICES_SORTED_BY_LETTER): add sorted_indices_by_letter as in Perl. * tp/Texinfo/XS/convert/converter.c (get_converter_indices_sorted_by_letter): call document sorted_indices_by_letter. Remove converter_sort_indices_by_letter. * tp/Texinfo/Convert/Converter.pm (get_converter_indices_sorted_by_letter), tp/Texinfo/XS/convert/ConvertXS.xs (get_converter_indices_sorted_by_letter): return index sorted by letter instead of caching it in the converter, it is already cached in the document. * tp/Texinfo/Document.pm (%XS_structure_overrides), tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings), tp/Texinfo/XS/main/build_perl_info.c (build_document) (find_idx_name_entry_number_sv, build_indices_sort_strings) (build_sorted_indices_by_letter): add XS interface for indices_sort_strings and sorted_indices_by_letter. * tp/t/test_utils.pl (test), tp/texi2any.pl: call indices_sort_strings early such that error messages from XS can be collected. 2024-02-11 Gavin Smith * doc/texinfo.texi (Other Customization Variables) : Minor edits for grammar and style. : Do not say that "Perl's built-in" comparison is used if this variable is set to 0, because it may in fact be strcmp in C that is used in XS code. 2024-02-11 Gavin Smith * Makefile.am (grand-replace): Add target to run grand-replace.sh script. * README-hacking: update 2024-02-11 Gavin Smith * info/nodes.c (adjust_nodestart): Increase the "fudge size" the later in the file the node is supposed to start. 2024-02-11 Gavin Smith * NEWS: mention COLLATION_LANGUAGE 2024-02-11 Gavin Smith * doc/texinfo.texi (Printing Japanese and Chinese): Document the heretofore undocumented texinfo-ja.tex and texinfo-zh.tex files. 2024-02-11 Gavin Smith * doc/texinfo.texi (Print with lpr): Remove node, as some of the information may be outdated and we don't need to maintain information on how a user may print a dvi or pdf file. 2024-02-11 Gavin Smith * info/variables.c (set_variable_to_value): Reorder code slightly. No functional change. 2024-02-11 Gavin Smith Avoid "M-x set-variable RET highlight-searches" inconsistency * info/variables.c (set_variable_to_value, update_highlight_searches): Split out code updating match_rendition. Do not do anything if it is already set to a non-zero value. This avoids an inconsistency with M-x set-variable, where selecting the default value "On" by just pressing Return did nothing, while typing in "On" and pressing Return would switch to using the "standout" style. 2024-02-11 Gavin Smith * info/variables.c (set_variable): Split out code getting the default value of a variable so it is easier to read, not using the ternary conditional operator. No functional change. 2024-02-11 Gavin Smith Avoid crash from undefined style. * info/variables.c (set_variable_to_value) (update_rendition_from_string): Split code dealing with rendition variables into a new function. Null terminate an array to avoid crash from undefined style. Report from Francesco Turco and fix from Andreas Schwab . 2024-02-09 Gavin Smith * doc/texinfo.tex (\unmacro): Allow calling with undefined macro, matching texi2any and the long-standing documentation. Report from Werner Lemberg. * NEWS: mention 2024-02-09 Gavin Smith Fix unnumbered sections in PDF outline. * doc/texinfo.tex (\unnumbered, \unnumberedsec, \unnumberedsubsec) (\unnumberedsubsubsec): Only increment \unnumberedno, not \secno, \subsecno or \subsubsecno. Only place \unnumberedno in the auxiliary .toc file. There was a bug where the section identifier might not be unique due to \unnumberedno only being incremented for the top-level @unnumbered command, not for any of the lower levels. For example, if two @chapter's had an @unnumberedsec in position 8 in the chapter, the identifier 10001.8 would occur twice. PDF readers such as evince had trouble making sense of the ensuing PDF "outline". Report from Arnold Robbins. 2024-02-09 Patrice Dumas * tp/Texinfo/Indices.pm (format_index_entries_sort_strings) (setup_sortable_index_entries, _setup_sort_sortable_strings_collator) (sort_indices_by_index, sort_indices_by_letter), tp/t/test_sort.t, tp/t/test_utils.pl (test): add format_index_entries_sort_strings to obtain $index_entries_sort_strings from output of setup_index_entries_sort_strings. Do not output $index_entries_sort_strings in setup_sortable_index_entries, _setup_sort_sortable_strings_collator, sort_indices_by_index and sort_indices_by_letter. Update callers. 2024-02-09 Patrice Dumas * tp/Texinfo/Document.pm (indices_sort_strings), tp/Texinfo/Indices.pm (setup_index_entries_sort_strings) (_setup_sort_sortable_strings_collator, sort_indices_by_index) (sort_indices_by_letter): add indices_sort_strings in Document.pm and cache setup_index_entries_sort_strings result in this function. Add _setup_sort_sortable_strings_collator for code common to sort_indices_by_index and sort_indices_by_letter. 2024-02-09 Patrice Dumas * tp/Texinfo/Indices.pm (setup_index_entries_sort_strings) (setup_sortable_index_entries, sort_indices_by_index) (sort_indices_by_letter): split setup_index_entries_sort_strings out of setup_sortable_index_entries, to setup sort strings. setup_sortable_index_entries takes now sort strings structure in argument and use a collator to setup the same structure as before. Remove _index_entry_element_sort_string_key. setup_index_entries_sort_strings store sort strings structure in the document if passed as argument. Update most callers to pass a document. 2024-02-08 Patrice Dumas * tp/Texinfo/Document.pm (sorted_indices_by_letter) (sorted_indices_by_index), tp/init/chm.pm, tp/Texinfo/Convert/Plaintext.pm (process_printindex), tp/Texinfo/Convert/Converter.pm (get_converter_indices_sorted_by_letter), tp/Texinfo/Convert/IXIN.pm: add Texinfo::Document sorted_indices_by_letter and sorted_indices_by_index that call the corresponding methods in Texinfo::Indices and cache the result in a document, distinguishing unicode collation or not and collation locale/language if given. Call those methods in converters. 2024-02-08 Gavin Smith * README-hacking: update instructions on updating copyright years. 2024-02-08 Gavin Smith Copyright years updating script * grand-replace.sh: Ignore tp/t/include to avoid clobbering tp/t/include/include_noeol.texi. 2024-02-08 Gavin Smith Copyright years updating script * grand-replace.sh: Add script. Name and idea of script comes from GNU Lilypond. 2024-02-08 Gavin Smith * README-hacking: Advertise gperf dependency. 2024-02-05 Patrice Dumas * tp/Texinfo/Indices.pm (sort_indices_by_index) (sort_indices_by_letter): get $use_unicode_collation and $locale_lang information from the caller. Update callers. 2024-02-05 Patrice Dumas * tp/t/test_sort.t: no need to register the configuration in XS document as it is the default configuration. 2024-02-05 Patrice Dumas * tp/maintain/setup_converters_code_tables.pl: fix package of text_brace_no_arg_commands. * tp/t/test_sort.t: no need to setup encoding anymore for index entries sorting. * tp/Texinfo/Indices.pm (setup_sortable_index_entries): move code. 2024-02-05 Patrice Dumas * tp/Texinfo/Indices.pm (_setup_collator) (setup_sortable_index_entries, sort_indices_by_index) (sort_indices_by_letter): add _setup_collator to setup a collator, call it in sort_indices_by_* before calling setup_sortable_index_entries and pass it to setup_sortable_index_entries instead of getting it from setup_sortable_index_entries. * tp/Texinfo/Indices.pm: remove Texinfo::CollateStub cmp, it is not used anymore. 2024-02-05 Patrice Dumas * tp/Texinfo/Indices.pm (sort_indices_by_letter): setup a sort string for letters sorting. Do not sort explicitly symbols before letters. Remove _collator_sort_string. 2024-02-05 Patrice Dumas * Texinfo/Indices.pm (_index_entry_element_sort_string_key) (setup_sortable_index_entries, sort_indices_by_index) (sort_indices_by_letter): always use a collator to sort index enties. Remove now unused _collator_sort_key and _collator_sort_index_entries. 2024-02-04 Patrice Dumas Add COLLATION_LANGUAGE for linguistic tailoring of indices sorting * tp/Texinfo/options_data.txt (COLLATION_LANGUAGE), tp/Texinfo/Indices.pm (setup_sortable_index_entries), doc/texinfo.texi (Other Customization Variables): add COLLATION_LANGUAGE to set linguistic tailoring for index sorting. Not set in the default case. Requires Unicode::Collate::Locale to be effective. For a discussion about this customization option, see bug-texinfo, 4 Feb 2024. 2024-02-04 Patrice Dumas * tp/Texinfo/Common.pm (%text_brace_no_arg_commands), tp/Texinfo/Convert/NodeNameNormalization.pm, tp/Texinfo/Convert/Text.pm: move %text_brace_no_arg_commands to Texinfo/Common.pm to avoid a dependency of NodeNameNormalization.pm on Text.pm as it leads to a circular dependency as Text.pm depends indirectly on NodeNameNormalization.pm. 2024-02-04 Patrice Dumas * Texinfo/Convert/NodeNameNormalization.pm (_convert): rename $command as $cmdname and use it more through the code. 2024-02-04 Patrice Dumas * tp/Texinfo/Indices.pm (setup_sortable_index_entries), tp/Texinfo/XS/main/manipulate_indices.c (setup_sortable_index_entries): do not set INCLUDE_DIRECTORIES, as it is only useful for @verbatiminclude, which cannot appear in index entries. 2024-02-04 Patrice Dumas Update po files 2024-02-04 Patrice Dumas Make indices sorting independent of the output encodings * NEWS, tp/Texinfo/Indices.pm (setup_sortable_index_entries), tp/Texinfo/XS/main/manipulate_indices.c (setup_sortable_index_entries): do not use setup_index_entry_keys_formatting to setup the conversion to text of sort strings. Instead setup the conversion to always use unicode if possible and never pass a converter. * tp/Texinfo/Indices.pm (setup_index_entry_keys_formatting): rename $customization_info as $customization_information. 2024-02-03 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_printindex_command), tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): if the first command in the first index entry in a letter is a no arg command, format the command, possibly using the upper case command to format the letter. * tp/Texinfo/XS/main/manipulate_indices.c (strip_index_ignore_chars) (index_entry_element_sort_string, new_index_entry_text_or_command) (idx_leading_text_or_command) (index_entry_first_letter_text_or_command), tp/Texinfo/XS/main/manipulate_indices.h (INDEX_ENTRY_TEXT_OR_COMMAND): add strip_index_ignore_chars based onindex_entry_element_sort_string code. Implement index_entry_first_letter_text_or_command in C. * test_files_generated_list, tp/t/html_tests.t (letter_command_in_index, U_in_index): new tests with @-commands in index entries that should be used for letter formatting. 2024-02-03 Patrice Dumas * tp/Texinfo/Common.pm (is_content_empty): do not consider text set to '0' to be empty. * tp/Texinfo/Convert/HTML.pm (_convert_printindex_command), tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): normalize and transliterate letter to use it as an identifier. Gather the first formatted index entry in a letter. Format the letter only once. * tp/Texinfo/Indices.pm (_idx_leading_text_or_command) (index_entry_first_letter_text_or_command): add a function that finds the first letter as an @-command, or the first letter text. 2024-02-02 Patrice Dumas * tp/Texinfo/Convert/Utils.pm (definition_category_tree), tp/Texinfo/XS/main/convert_utils.c (definition_category_tree): set translation using the documentlanguage extra information from the tree element if there are no options available. 2024-02-02 Patrice Dumas * tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal): translate untranslated type using the documentlanguage extra information from the tree element if there is no converter available. 2024-02-02 Patrice Dumas * tp/Texinfo/XS/main/document.c (unregister_document_merge_with_document): merge unregister_document_descriptor_tree in unregister_document_merge_with_document. Remove TREE_AND_STRINGS. 2024-02-02 Patrice Dumas * tp/Texinfo/XS/main/document.c (unregister_document_merge_with_document), tp/Texinfo/XS/main/translations.c (gdt_tree): add based on gdt_tree code. * tp/Texinfo/XS/convert/convert_html.c (html_gdt, html_gdt_tree) (html_cdt_tree): redo functions based on new codes. 2024-02-02 Patrice Dumas * tp/Texinfo/XS/main/translations.c (replace_convert_substrings): call reset_parser. * tp/Texinfo/XS/convert/convert_html.c (html_cdt), tp/Texinfo/XS/main/translations.c (replace_convert_substrings, gdt): pass debug_level instead of options to replace_convert_substrings. Set parser debug level in replace_convert_substrings. 2024-02-02 Patrice Dumas * tp/Texinfo/Translations.pm (translate_string, gdt, gdt_string): remove unused translate_string first argument. Do not remove the first argument of the user-defined $translate_string_method optionally passed to gdt and gdt_string. Update callers. * tp/Texinfo/Translations.pm (_replace_substrings) (_replace_convert_substrings): rename to make clear that the functions are internal. Replace _replace_convert_substrings $customization_information by $debug_level as it is the only variable that is used and we want to keep it like this. * tp/Texinfo/XS/main/translations.c (translate_string): remove unused first argument. Update callers. 2024-02-02 Patrice Dumas * tp/Texinfo/Convert/Converter.pm (pcdt): call cdt. * tp/Texinfo/Translations.pm (gdt, gdt_string): add a $translate_string_method to allow customization of translate_string instead of using can on the $customization_information argument. * tp/Texinfo/Convert/HTML.pm (@ISA, html_translate_string) (cdt, cdt_string): do not inherit Texinfo::Translations. Rename translate_string as html_translate_string. Redefine cdt and cdt_string to pass html_translate_string to gdt and gdt_string to customize translate_string. 2024-02-02 Patrice Dumas * tp/Texinfo/XS/main/convert_utils.c (cdt_tree): add to replace gdt_tree when only converter is used. Update caller of gdt_tree. * tp/Texinfo/XS/convert/convert_html.c (html_translate_string), tp/Texinfo/XS/main/translations.c (translate_string): change order of arguments. Use passed lang as is. Update callers. * tp/Texinfo/XS/main/translations.c (gdt, gdt_tree, gdt_string) (pgdt_tree), tp/Texinfo/XS/main/DocumentXS.xs: change arguments order. Update callers. * tp/Texinfo/XS/convert/convert_html.c (html_cdt, html_cdt_tree) (html_cdt_string, html_pcdt_tree): use instead of html_gdt, html_gdt_tree and html_gdt_string and html_pgdt_tree. Determine lang from converter in html_cdt_tree and html_cdt_string, use converter document. Update callers. * tp/Texinfo/XS/structuring_transfo/structuring.c (new_master_menu): separate better cases of options defined or not. 2024-02-02 Patrice Dumas * tp/Texinfo/Translations.pm (pgdt): call gdt directly. * tp/Texinfo/Convert/Converter.pm (@ISA), tp/Texinfo/Convert/HTML.pm (@ISA): do not inherit Texinfo::Translations in Converter.pm. Inherit Texinfo::Translations in HTML.pm, only to be able to redefine translate_string. 2024-02-02 Patrice Dumas * doc/texi2any_api.texi (Translations Output and Customization), (Internationalization of Strings Function), po_document/Makevars (XGETTEXT_OPTIONS), tp/Texinfo/Convert/Converter.pm (cdt, cdt_string) (pcdt), tp/Texinfo/Convert/*.pm, tp/Texinfo/Translations.pm (translate_string, gdt, gdt_string, pgdt): do not set language in gdt, gdt_string, pgdt, instead get it as argument. Change the arguments order to have $lang appear earlier. Add wrappers for converters, called cdt, cdt_string and pcdt that set the language with get_conf('documentlanguage'). Update callers. 2024-02-02 Patrice Dumas No encoding, no us-ascii added to locale for document translations * NEWS, doc/texinfo.texi (Internationalization of Document Strings), tp/Texinfo/Translations.pm (translate_string), tp/Texinfo/XS/main/translations.c (translate_string): do not prepend the encoding nor us-ascii to the locale name to find the translations. For the encoding it is not done in XS, not useful since long in Perl and encoding was never available when translating from parser. Note that this does not constrain the actual encoding declared in the po/mo file (which could be us-ascii) and do not prevent from using accented @-commands in translations (which would be needed for accented letters if the encoding is us-ascii). 2024-02-02 Patrice Dumas * tp/tests/Makefile.onetst, tp/tests/coverage/list-of-tests: disable the test of --trace-includes as it leads to a different result in out of sources build. 2024-02-01 Patrice Dumas * tp/Texinfo/XS/main/get_perl_info.c (copy_sv_options_for_convert_text): fetch ASCII_GLYPH, NUMBER_SECTIONS and set_case. * tp/t/convert_to_text.t: test 'set_case' value set as a Texinfo::Convert::Text::convert_to_text call option. 2024-02-01 Patrice Dumas * tp/Makefile.am (test_files), t/input_files/formatting_customizations_input.texi, tp/Makefile.tres, tp/t/converters_tests.t (reference_for_formatting_customizations) (test_formatting_customizations), tp/tests/Makefile.onetst, tp/tests/formatting/list-of-tests: add tests of customizations on formatting. Setup a separate test in tests/formatting/list-of-tests to be able to test rawtext too, as in t/*.t raw text does not take into account customization. * tp/Texinfo/Convert/Text.pm (brace_no_arg_command), tp/Texinfo/Convert/Unicode.pm (unicode_point_decoded_in_encoding), tp/Texinfo/XS/main/convert_to_text.c (text_brace_no_arg_command), tp/Texinfo/XS/main/unicode.c (unicode_point_decoded_in_encoding): consider that encoding is the default, UTF-8 in unicode_point_decoded_in_encoding if undef. Check that encoding is defined in text brace_no_arg_command and do not call unicode brace_no_arg_command if not. * tp/Texinfo/Translations.pm (import), tp/Texinfo/XS/main/DocumentXS.xs (configure_output_strings_translations), tp/Texinfo/XS/main/translations.c (configure_output_strings_translations): rename translations_configure as configure_output_strings_translations. * tp/Texinfo/XS/main/translations.c (configure_output_strings_translations): add error message if bindtextdomain failed. * tp/Texinfo/XS/convert/convert_html.c (html_translate_names): add document to html_gdt_tree call. 2024-02-01 Patrice Dumas * tp/Texinfo/XS/convert/call_html_perl_function.c, tp/Texinfo/XS/main/call_perl_function.c (get_call_index_entries_sorted_by_letter): move get_call_index_entries_sorted_by_letter to call_perl_function.c. * tp/Texinfo/XS/convert/converter.c (converter_sort_indices_by_letter), tp/Texinfo/XS/main/manipulate_indices.c: move converter_sort_indices_by_letter to converter.c. * tp/Texinfo/Convert/Converter.pm (%XS_overrides) (_XS_get_converter_indices_sorted_by_letter) (get_converter_indices_sorted_by_letter), tp/Texinfo/Convert/HTML.pm (get_info), tp/Texinfo/Indices.pm (%XS_convert_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (get_converter_indices_sorted_by_letter), tp/Texinfo/XS/main/IndicesXS.xs, tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/convert/converter.c (get_converter_indices_sorted_by_letter): add get_converter_indices_sorted_by_letter based on get_info in HTML.pm and associated _XS_get_converter_indices_sorted_by_letter based on get_converter_indices_sorted_by_letter in Texinfo::Indices. Remove Texinfo::Indices::get_converter_indices_sorted_by_letter. Move get_converter_indices_sorted_by_letter to ConvertXS.xs. Rename html_get_info_index_entries_by_letter as get_converter_indices_sorted_by_letter and move to converter.c. 2024-01-31 Patrice Dumas Sort index entries on demand in HTML * tp/Texinfo/Convert/HTML.pm (get_info, convert, output): sort indices when get_info is called for 'index_entries_by_letter'. * tp/Texinfo/XS/main/IndicesXS.xs (get_converter_indices_sorted_by_letter), tp/Texinfo/XS/main/manipulate_indices.c (converter_sort_indices_by_letter): add converter_sort_indices_by_letter to sort index entries by letter with a converter. Call it in get_converter_indices_sorted_by_letter. * tp/Texinfo/XS/convert/call_html_perl_function.c (get_call_index_entries_sorted_by_letter), tp/Texinfo/XS/convert/convert_html.c (html_get_info_index_entries_by_letter, convert_printindex_command): add get_call_index_entries_sorted_by_letter to get sorted indices from HTML by calling Texinfo::Convert::HTML::get_info and get_sv_index_entries_sorted_by_letter. Add html_get_info_index_entries_by_letter and call it when sorted indices are needed. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs: remove _XS_get_index_entries_sorted_by_letter, _NonXS_sort_index_entries, _XS_only_sort_index_entries, _sort_index_entries, get_index_entries_sorted_by_letter, html_sort_index_entries. 2024-01-31 Patrice Dumas * tp/Texinfo/XS/main/document.c (document_merged_indices): rename merged_indices as document_merged_indices. * tp/Texinfo/XS/convert/convert_html.c (html_sort_index_entries): use document_merged_indices. * tp/Texinfo/XS/main/manipulate_indices.c (index_entry_element_sort_string, index_entry_element_sort_string_key) (setup_sortable_index_entries, sort_indices_by_letter): use const for merged_indices. 2024-01-31 Patrice Dumas * tp/Texinfo/Common.pm (locate_include_file): change code used to concatenate directories and file to get the same result as with XS/C in tests. 2024-01-31 Patrice Dumas * tp/Texinfo/Common.pm (locate_include_file): simplify code. 2024-01-31 Patrice Dumas * tp/Texinfo/ParserNonXS.pm (_end_line_misc_line): check if verbatiminclude path is defined. 2024-01-31 Patrice Dumas * tp/Texinfo/XS/Makefile.am (nodist_IndicesXS_la_SOURCES), tp/Texinfo/XS/main/IndicesXS.xs: move IndicesXS.xs to main/. 2024-01-31 Patrice Dumas * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES) (IndicesXS_la_SOURCES, ConvertXS_la_SOURCES), tp/Texinfo/XS/main/manipulate_indices.c: move indices_in_conversion.c to main/ and rename as manipulate_indices.c. * tp/Texinfo/Convert/HTML.pm (_NonXS_sort_index_entries), tp/Texinfo/Convert/IXIN.pm (output_ixin), tp/Texinfo/Convert/LaTeX.pm (_prepare_indices), tp/Texinfo/Convert/Plaintext.pm (process_printindex), tp/Texinfo/Document.pm (merged_indices), tp/init/chm.pm, tp/t/test_sort.t, tp/t/test_utils.pl: add merged_indices in Texinfo::Document to store and get merged indices in document. * tp/Texinfo/XS/convert/convert_html.c (html_sort_index_entries), tp/Texinfo/XS/main/converter_types.h, tp/Texinfo/XS/main/document.c (merged_indices, destroy_document_information_except_tree), tp/Texinfo/XS/main/document_types.h (MERGED_INDEX, MERGED_INDICES) (DOCUMENT), tp/Texinfo/XS/main/manipulate_indices.c (merge_indices) (destroy_merged_indices, setup_sortable_index_entries) (sort_indices_by_letter): add merged_indices in document to store and get merged indices in document. Remove index_entries from CONVERTER. Move MERGED_INDEX to document_types.h, add MERGED_INDICES struct for a list of merged indices. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_NonXS_sort_index_entries), tp/Texinfo/XS/convert/ConvertXS.xs, tp/Texinfo/XS/convert/convert_html.c: remove _XS_html_merge_index_entries and html_merge_index_entries. 2024-01-31 Patrice Dumas * doc/texi2any_api.texi (Conversion General Information), tp/Texinfo/Convert/HTML.pm (%available_converter_info) (_NonXS_sort_index_entries), tp/init/chm.pm (chm_init): remove 'index_entries' from the HTML general information API, it can easily be setup in user code. * tp/Texinfo/XS/main/build_perl_info.c (build_sorted_indices_by_letter): add to be able to build Perl sorted indices from C data. * tp/Texinfo/Indices.pm (%XS_convert_overrides) (get_converter_indices_sorted_by_letter), tp/Texinfo/XS/convert/IndicesXS.xs (get_converter_indices_sorted_by_letter): add an XS interface to get indices sorted by letter from a converter. * tp/Texinfo/Convert/HTML.pm (get_info): get 'index_entries_by_letter' on demand from XS if not already set. 2024-01-30 Patrice Dumas Add gnulib module for XS * tp/Texinfo/XS: Run "gnulib-tool --add-import unictype/category-Mn" 2024-01-30 Patrice Dumas * contrib/mass_test/generate_perlVSC.sh: do not remove the directories if only one test is done. * contrib/mass_test/check_perlVSC.sh: add the possibility to check the diff for one test only. 2024-01-30 Patrice Dumas Index sorting in C * tp/Texinfo/Indices.pm (setup_sortable_index_entries): rename variables. Simplify code that determine that there is one non empty entry/subentry. * tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry), tp/Texinfo/XS/main/tree_types.h (INDEX_ENTRY): add index entry number in index entry structure. * tp/Texinfo/XS/convert/indices_in_conversion.c (set_sort_key) (INDEX_SORT_STRING_KEY, index_entry_element_sort_string_key) (setup_sortable_index_entries, LETTER_SORTABLE_ENTRIES) (INDEX_LETTERS_SORTABLE_ENTRIES, compare_index_letter) (compare_sortable_subentry_keys, compare_sortable_index_entry) (sort_indices_by_letter), tp/Texinfo/XS/convert/indices_in_conversion.h (SORTABLE_INDEX_SUBENTRY, SORTABLE_INDEX_ENTRY) (INDEX_SORTABLE_ENTRIES, INDICES_SORTABLE_ENTRIES): implement index sorting by letter in C. * tp/Texinfo/XS/configure.ac: check for newlocale and strxfrm_l. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_NonXS_sort_index_entries, _XS_only_sort_index_entries) (_sort_index_entries), tp/Texinfo/XS/convert/ConvertXS.xs (html_sort_index_entries), tp/Texinfo/XS/convert/convert_html.c (html_sort_index_entries): XS interface for index sorting in HTML, if TEST is not set. 2024-01-29 Gavin Smith * doc/texinfo.texi (Other Customization Variables), * NEWS: Document USE_UNICODE_COLLATION. 2024-01-29 Patrice Dumas Add @verbatiminclude files to --trace-includes output * tp/Texinfo/ParserNonXS.pm (_end_line_misc_line), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line): add @verbatiminclude file to included_files if found and readable. No errors if not found or not readable. * tp/tests/Makefile.onetst, tp/tests/coverage/list-of-tests (formatting_trace_includes): add a test of --trace-includes. * doc/texinfo.texi: fix a typo. 2024-01-29 Patrice Dumas * tp/Texinfo/Indices.pm (setup_sortable_index_entries): use Unicode::Collate if possible if USE_UNICODE_COLLATION is undef. * tp/Texinfo/options_data.txt (TRACE_INCLUDES): reclassify as program_cmdline. 2024-01-28 Patrice Dumas * tp/texi2any.pl, tp/t/init/redefine_need.init (my_need_formatting), doc/texi2any_api.texi (Getting Build Constants), tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm (%build_constants, set_build_constant) (get_build_constant): rename get_constant as get_build_constant and set_constant as set_build_constant (Gavin). 2024-01-28 Gavin Smith USE_UNICODE_COLLATION * tp/Texinfo/options_data.txt: Add USE_UNICODE_COLLATION, 1 by default. * tp/Texinfo/Indices.pm (setup_sortable_index_entries): If USE_UNICODE_COLLATION is false, use the Texinfo::CollateStub module instead of Unicode::Collate. 2024-01-28 Patrice Dumas * tp/texi2any.pl: set also PACKAGE*_CONFIG to have the same symbols defined as in C. * tp/t/init/redefine_need.init (my_need_formatting): also test PACKAGE_CONFIG. 2024-01-28 Gavin Smith * tp/Texinfo/Convert/Info.pm (format_node): Remove commented-out line of code. 2024-01-28 Gavin Smith * tp/Texinfo/Convert/Unicode.pm (string_width): Do not reset the counter to zero at a newline, as this only occurs for malformed input and it is not worth the complication. * tp/Texinfo/XS/main/utils.c (width_multibyte): Make the same change. Reverses change on 2023-12-31. 2024-01-28 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (ensure_end_of_line, _ensure_end_of_line): Move function in file to be right after _add_newline_if_needed, as the implementation is similar. Rename with leading underscore to mark as "internal", and do not call with method call syntax throughout. No functional change intended. 2024-01-28 Gavin Smith * info/infodoc.c (describe_key): Fix handling of keys with "invalid" mappings. Report from Bugsy Abatantuono . 2024-01-28 Gavin Smith * info/doc.h (FUNCTION_DOC, InfoCommand): Use "InfoCommand" as the sole name for this type. 2024-01-28 Gavin Smith * info/info.h (Function, CFunction): Remove unused typedefs. 2024-01-28 Gavin Smith * NEWS: update for PACKAGE_* name change 2024-01-28 Gavin Smith * tp/Texinfo/options_data.txt: Remove _OPTION suffixes from PACKAGE_* variables in order to maintain backwards compatability, especially for customization files (e.g. for ffmpeg). Report from Arsen Arsenović . * tp/texi2any.pl: Set the variables from the "configured information" without adding a suffix. * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/Info.pm, tp/Texinfo/XS/convert/convert_html.c, tp/t/init/t2h_singular.init, tp/t/layout.t: Consequent changes. * tp/maintain/regenerate_C_options_info.pl: #undef the PACKAGE_* symbols to avoid a clash with symbols defined by autoconf. Analysis by Patrice. * tp/Texinfo/XS/configure.ac: Propagate PACKAGE, PACKAGE_NAME, PACKAGE_URL and PACKAGE_VERSION using AC_DEFINE_UNQUOTED, with a _CONFIG suffix, in order to make these symbols still accessible in the XS sources. Suggestion from Patrice. * tp/Texinfo/XS/main/build_perl_info.c (init): Refer to PACKAGE_CONFIG rather than PACKAGE. 2024-01-27 Gavin Smith * doc/texinfo.texi (Invoking texi2any), * tp/texi2any.pl (makeinfo_help): Reword description of --trace-includes option. 2024-01-27 Patrice Dumas * doc/texinfo.texi (Invoking @command{texi2any}) (Customization Variables and Options), tp/Texinfo/options_data.txt, tp/texi2any.pl: rename SHOW_INCLUDE_FILE_PATHS as TRACE_INCLUDES and add --trace-includes command-line option. Name from Gavin. 2024-01-27 Patrice Dumas * tp/texi2any.pl: avoid \n in translated strings, split each option in a translatable string. Report from Benno Schulenberg. 2024-01-27 Patrice Dumas * tp/t/init/redefine_need.init (my_need_formatting): get PACKAGE instead of PACKAGE_AND_VERSION to have a string independent of the Texinfo package version. 2024-01-26 Patrice Dumas * doc/Makefile.am (gendocs_envvars, wwwdoc-build): link texinfo.tex and add environnement variables to gendocs_envvars to build with in-source commands. 2024-01-26 Patrice Dumas * TODO: update. 2024-01-26 Patrice Dumas * tp/Texinfo/options_data.txt: set CHECK_NORMAL_MENU_STRUCTURE to 1 in the default case. * NEWS: update. 2024-01-26 Patrice Dumas * tp/Texinfo/options_data.txt, tp/texi2any.pl: add customization variable SHOW_INCLUDE_FILE_PATHS with which included file paths are output. * tp/texi2any.pl: remove document even when there is no conversion, but parse, structure, dump or similar. 2024-01-26 Patrice Dumas Gather include file paths in document global information * tp/Texinfo/ParserNonXS.pm (_end_line_misc_line), tp/Texinfo/XS/main/build_perl_info.c (build_global_info), tp/Texinfo/XS/main/document_types.h (GLOBAL_INFO), tp/Texinfo/XS/main/utils.c (delete_global_info), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), tp/Texinfo/XS/parsetexi/parser.c (store_document): store include file paths in included_files global information new field. 2024-01-26 Patrice Dumas * doc/texi2any_api.texi (Getting Constants), tp/Texinfo/Common.pm (set_constant, get_constant): add setting/getting constants. * tp/texi2any.pl: set PACKAGE* as constants. * tp/t/init/redefine_need.init (my_need_formatting): use constants by get_constant. 2024-01-26 Patrice Dumas * tp/Texinfo/XS/main/extra.c (add_associated_info_string_dup): add. * tp/Texinfo/XS/main/DocumentXS.xs (set_document_global_info), tp/Texinfo/XS/main/build_perl_info.c (store_additional_info) (build_additional_info, build_global_info), tp/Texinfo/XS/main/document_types.h (GLOBAL_INFO), tp/Texinfo/XS/main/utils.c (delete_global_info): split build_additional_info out of store_additional_info, to build additional info on a passed hash. Pass other set document global info in a associated_info. * tp/texi2any.pl: set configured_information PACKAGE* variables and pass them as set_document_global_info. * tp/t/init/redefine_need.init (my_need_formatting): test getting PACKAGE_AND_VERSION. 2024-01-25 Patrice Dumas * tp/t/test_utils.pl (set_converter_option_defaults, convert_to_*) (test): remove unused $main_configuration argument. Add a $debug argument to set_converter_option_defaults $debug argument and set converted_format and DEBUG options in set_converter_option_defaults. * tp/t/test_utils.pl (test): move code around, small changes. 2024-01-25 Patrice Dumas * tp/Texinfo/Document.pm: update POD documentation. 2024-01-25 Patrice Dumas * Pod-Simple-Texinfo/pod2texi.pl (_parsed_manual_tree), tp/t/test_utils.pl (test), tp/texi2any.pl: do not get a return value from Texinfo::Transformations::insert_nodes_for_sectioning_commands. * tp/t/test_utils.pl (test), tp/texi2any.pl: do not get a return value from Texinfo::Transformations::fill_gaps_in_sectioning. Update POD documentation. 2024-01-25 Patrice Dumas * tp/Texinfo/XSLoader.pm (init): simply use _fatal if the libtool name was not found. 2024-01-25 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_default_format_element_footer): use an explicit list of characters to be considered as spaces to cope with all the perl versions. * tp/Texinfo/XS/convert/convert_html.c (word_number_more_than_level) (html_default_format_element_footer): return the count by reference in word_number_more_than_level. * tp/Texinfo/XS/convert/convert_html.c (word_number_more_than_level): count words, not spaces. 2024-01-24 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (add_newline_if_needed): Implement checking end of a string for newline using "use bytes". 2024-01-24 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (_convert): Rename a variable. 2024-01-24 Gavin Smith * tp/Texinfo/Convert/Info.pm (format_node): Pass return value of node_name to Texinfo::Convert::Plaintext::_decode if interpolating into an error message. 2024-01-24 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (convert_line_new_context): Unconditionally disable encoding in the nested count context and remove a parameter. All callers updated. (node_name): Call _stream_encode on the result of convert_line_new_context in order still to work with an encoded node name. 2024-01-24 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (process_printindex) : Do not increment $self->{'count_context'}->[-1]->{'bytes'} as this is taken care of in _stream_output. 2024-01-24 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (process_printindex) <(outside of any node>: Call convert_line_new_context with encoding disabled. 2024-01-24 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (convert_new_context): Inline into the two places it is called and remove function. Set 'encoding_disabled' on the nested count context and pass result to _stream_output instead of _stream_output_encoded. 2024-01-23 Patrice Dumas * tp/Texinfo/XSLoader.pm (init): if fallback module is not set, return undef instead of calling die. For many XS modules there is no perl module fallback, instead, if the perl methods are used instead of the XS methods the output should be fine. For the other cases, the return value of init should be checked. * tp/Texinfo/Convert/ConvertXS.pm ($XS_package, BEGIN), tp/Texinfo/Convert/Converter.pm (get_conf), tp/Texinfo/Convert/PlainTexinfo.pm (convert_tree), tp/Texinfo/Convert/Text.pm (convert_to_text, output), tp/Texinfo/StructTransfXS.pm ($XS_package, BEGIN), tp/Texinfo/Transformations.pm (_new_node): set $XS_package with Texinfo::XSLoader::init return value for ConvertXS and StructTransfXS, and check the value in codes that need to know if the module was loaded, for instance if th eperl functions that are not overriden should not be called. * tp/Texinfo/Document.pm (%XS_overrides): remove remove_document_descriptor override, it is not defined in perl. 2024-01-23 Patrice Dumas * tp/Texinfo/Convert/ConvertXS.pm (BEGIN), tp/Texinfo/Convert/Paragraph.pm (BEGIN), tp/Texinfo/DocumentXS.pm (BEGIN), tp/Texinfo/IndicesXS.pm (BEGIN), tp/Texinfo/MiscXS.pm (BEGIN), tp/Texinfo/Parser.pm (BEGIN), tp/Texinfo/StructTransfXS.pm (BEGIN): leave out Texinfo::XSLoader::init warning and fatal message arguments when they are undef. 2024-01-23 Patrice Dumas * tp/Texinfo/DocumentXS.pm (BEGIN), tp/Texinfo/IndicesXS.pm (BEGIN), tp/Texinfo/StructTransfXS.pm (BEGIN): set the Texinfo::XSLoader::init fallback_module module argument to undef when there is no actual fallback module. 2024-01-23 Patrice Dumas * configure.ac (AM_INIT_AUTOMAKE): decrease required automake version to 1.16.1, which requires @setfilename in Texinfo manuals, but it also the version still found for some platforms. 2024-01-23 Patrice Dumas * info/Makefile.am (AUTOMAKE_OPTIONS): remove no-dist-built-sources, it does not seems to be useful. If it is readded, the automake required version should be increased. 2024-01-23 Patrice Dumas * doc/texi2any_api.texi: add @setfilename to simplify using old automake versions. 2024-01-23 Patrice Dumas * doc/refcard/Makefile.am (pdf-local): use pdf-local instead of all for the txirefcard target, to avoid depending on tex being installed when building from development sources. 2024-01-23 Gavin Smith * tp/Texinfo/Translations.pm (gdt_string_encoded): Remove now unused function. 2024-01-23 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (_text_heading): Return an unencoding string to be output with _stream_output rather than _stream_output_encoded. Callers updated. Call convert_line_new_context with encoding disabled. Call gdt_string rather than gdt_string_encoded and get display width of result with string_width. 2024-01-23 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (_stream_output): Interchange second and third parameters, to simplify calling when the formatter argument is undef. All callers updated. 2024-01-23 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (_convert, format_contents): Call convert_line_new_context with encoding disabled in more places and pass the result to _stream_output rather than _stream_output_encoded. 2024-01-23 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (convert_line_new_context): Take a new parameter, $encoding_disabled, and set the 'encoding_disabled' flag if set. * tp/Texinfo/Convert/Info.pm (_info_header): Output copying block directly by calling _convert, rather than passing the result of convert_tree to _stream_output_encoded. Use new argument to convert_line_new_context to convert @dircategory commands. Convert and output @dircategory and @direntry commands without calling _stream_output_encoded. 2024-01-23 Gavin Smith * tp/Texinfo/Convert/Plaintext.pm (_stream_byte_count): Recognize an 'encoding_disabled' flag on the count context, and if set, do not encode the output. (process_printindex): Set this flag when converting an index entry and output the result with _stream_output rather than _stream_output_encoded, and to get the display width call string_width rather than string_width_encoded. 2024-01-22 Patrice Dumas * tp/Texinfo/Convert/HTML.pm (_convert_tab_command): round using %.0f to be more accurate than with %d. * tp/Makefile.tres, tp/t/html_tests.t (fractions_rounding): add a test that shows an incorrect percent rounding with %d with perl. 2024-01-22 Patrice Dumas * tp/Makefile.tres, tp/t/html_tests.t (contents_with_only_top_node) (top_node_top_contents): tests of html_text and file_html for @contents with @node only or @node and @top only. * tp/Texinfo/XS/convert/convert_html.c (prepare_special_units): do contents/shortcontents directions only if there is more than one section. 2024-01-22 Patrice Dumas * tp/Makefile.tres, tp/t/html_tests.t (end_of_line_in_uref): add test of end of line in uref. * tp/Texinfo/XS/convert/convert_html.c (url_protect_url_text) (url_protect_file_text), tp/Texinfo/XS/main/utils.c (encode_with_iconv): pad x percent format with 0. 2024-01-22 Patrice Dumas * tp/Makefile.tres, tp/t/html_tests.t (empty_node_in_html_title_no_sec_name, empty_chapter_in_html_title) (empty_chapter_in_html_title_no_node_no_use_nodes): tests with empty node/chapter in html formatting. 2024-01-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_mini_toc), tp/Texinfo/XS/convert/convert_html.c (mini_toc_internal): handle empty sectioning command in mini toc. * tp/Makefile.tres, tp/t/30sectioning.t (empty_section_in_chapter): test empty @section in @chapter conversion. 2024-01-22 Patrice Dumas <pertusus@free.fr> * contrib/mass_test/generate_perlVSC.sh: show command line when doing only one test. 2024-01-21 Patrice Dumas <pertusus@free.fr> * contrib/mass_test/*.sh: add more manuals, separate script to output HTML, separate generating HTML and checking the differences. 2024-01-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/DocBook.pm: comments covering, hopefully, all the things to change for DocBook 5, following Jean-Christophe Helary mail on bug-texinfo. 2024-01-22 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (process_footnotes) (format_contents, _menu, process_printindex): Change some uses of _stream_output_encoded to _stream_output. 2024-01-22 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm: When outputting a single newline, call _stream_output instead of _stream_output_encoded. This reduces calls to _stream_byte_count to encode the output and allows output to be encoded in fewer, bigger chunks. 2024-01-22 Gavin Smith <gavinsmith0123@gmail.com> Eliminate empty lines counting * tp/Texinfo/Convert/Plaintext.pm (conversion_initialization) (_add_newline_if_needed, process_footnotes, _convert), * tp/Texinfo/Convert/Info.pm (_info_header, format_node): Eliminate all updating of $self->{'empty_lines_count'}. 2024-01-22 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <empty_line>: Unconditionally call _get_form_feeds to propagate form feeds in the input to the output regardsless of 'empty_lines_count'. 2024-01-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Transformations.pm (_new_node): call confess if _new_node is called with XS. * tp/t/accents.t: do not set document_descriptor as an option for the converter. 2024-01-21 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_add_newline_if_needed): Replace with implementation that checks the end of the output stream rather than the 'empty_lines_count' counter. * tp/Texinfo/Convert/Info.pm (_info_header): Call _add_newline_if_needed to ensure a blank line at the end of the header. 2024-01-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (%common_converters_defaults): remove document_descriptor, which should not be passed from perl, but added in XS only. 2024-01-21 Patrice Dumas <pertusus@free.fr> Do not remove .inf or .info from manual name for HTML cross references * NEWS, tp/Texinfo/Convert/HTML.pm (_external_node_href), tp/Texinfo/XS/convert/convert_html.c (external_node_href): do not remove a .inf or .info at the end of manual name argument for cross-references to external nodes. This is not done for other formats, does not comply with the HTML cross references specification and is probably a remnant of times long gone. 2024-01-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (output_tree) (conversion_output_begin, conversion_output_end), tp/Texinfo/Convert/DocBook.pm (conversion_output_begin) (conversion_output_end, output), tp/Texinfo/Convert/PlainTexinfo.pm (output), tp/Texinfo/Convert/TexinfoMarkup.pm (conversion_output_begin, conversion_output_end, output), tp/Texinfo/Convert/TextContent.pm (output), tp/Texinfo/DebugTree.pm (output): add output_tree in Converter.pm, a generic method to convert a Texinfo tree to a file, to be called from output. output_tree calls conversion_output_begin and conversion_output_end. Call output_tree in output in converters that convert a whole tree. Rename _output_beginning as conversion_output_begin and _output_end as conversion_output_end in TexinfoMarkup.pm and DocBook.pm. Update Converter.pm POD documentation. * tp/Texinfo/Convert/PlainTexinfo.pm (convert): call convert_tree. 2024-01-21 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <float>: Call _add_newline_if_needed instead of checking $self->{'empty_lines_count'} and outputing a newline directly. 2024-01-21 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <empty_line>: Try to separate form feed handling from code that actually adds an empty line to the output. Call _add_newline_if_needed to output the newline and increment the count of empty lines. 2024-01-20 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/DocBook.pm (_output_beginning, output) (_output_end), tp/Texinfo/Convert/TexinfoMarkup.pm (_output_beginning) (output, _output_end): add _output_beginning to prepare output appearing before tree conversion, and _output_end for output after tree conversion. 2024-01-20 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/DocBook.pm (_convert): do not ignore especially sectionning commands with in_skipped_node_top, let the output be generated and discarded as for the remaining of the output. 2024-01-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm: update POD documentation. 2024-01-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm, tp/maintain/template.pod: remove document from converter argument. Add conversion_initialization, conversion_finalization and set_document documentation. 2024-01-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (set_document), tp/Texinfo/Convert/DocBook.pm (_index_entry), tp/Texinfo/Convert/HTML.pm (_convert_printindex_command) (_sort_index_entries, _prepare_index_entries_targets) (output_internal_links), tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/LaTeX.pm (_prepare_indices, _index_entry), tp/Texinfo/Convert/Plaintext.pm (process_printindex), tp/Texinfo/Convert/TexinfoMarkup.pm (_index_entry, _convert), tp/init/chm.pm): do not set 'indices_information', instead use document indices_information to get indices information. 2024-01-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (set_document) (_set_output_units_files), tp/Texinfo/Convert/HTML.pm (label_command) (_get_top_unit, _convert_heading_command) (_set_root_commands_targets_node_files, _html_set_pages_files) (_prepare_units_directions_files, output), tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm (output), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert): do not set 'identifiers_target', instead use document labels_information to get document labels information identifiers_target. 2024-01-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (set_document), tp/Texinfo/Convert/HTML.pm (_convert_heading_command) (_convert_contents_command, _contents_shortcontents_in_title) (_set_root_commands_targets_node_files, _prepare_special_units) (_default_format_contents), tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/LaTeX.pm (_begin_document, _convert), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/ext/epub3.pm, tp/init/book.pm (book_convert_heading_command), tp/init/chm.pm (chm_init): do not set 'sections_list', instead use document sections_list to get document sections list. 2024-01-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (set_document), tp/Texinfo/Convert/HTML.pm (get_value): do not set 'document_descriptor' nor 'document_values'. * tp/Texinfo/Convert/Converter.pm (set_document), tp/Texinfo/Convert/HTML.pm (_convert_listoffloats_command), tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/LaTeX.pm (_prepare_floats, _latex_header, _convert), tp/Texinfo/Convert/Plaintext.pm (_convert): do not set 'floats', instead use document floats_information to get document floats information. 2024-01-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Common.pm (set_output_encodings): use document in input argument. Update callers. * tp/Texinfo/Convert/Converter.pm (set_document) (determine_files_and_directory), tp/Texinfo/Convert/HTML.pm (_prepare_converted_output_info), tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm (output, _info_header), tp/Texinfo/Convert/Utils.pm (encoded_output_file_name) (encoded_input_file_name): do not set 'document_info', instead use document global_information to get document information. 2024-01-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Common.pm (find_parent_root_command), tp/Texinfo/Convert/Converter.pm (set_document) (determine_files_and_directory, set_global_document_commands), tp/Texinfo/Convert/DocBook.pm (output, _convert), tp/Texinfo/Convert/HTML.pm (_get_top_unit, get_file_information) (%available_converter_info, _convert_insertcopying_command) (_default_format_titlepage, _set_heading_commands_targets) (_html_get_tree_root_element, _prepare_special_units) (_prepare_output_units_global_targets, _prepare_footnotes_targets) (_has_contents_or_shortcontents, _prepare_simpletitle) (_prepare_converted_output_info), tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm (_info_header), tp/Texinfo/Convert/LaTeX.pm (_prepare_conversion, _begin_document, _convert), tp/Texinfo/Convert/Plaintext.pm (_convert): remove 'global_commands' from converter. The 'document' is used instead to get the global commands information. in HTML.pm, remove 'global_commands' from %available_converter_info and add 'document'. * tp/Texinfo/Common.pm (get_global_document_command): change order of ifs. 2024-01-18 Gavin Smith <gavinsmith0123@gmail.com> Use foreach loop for Info output * tp/Texinfo/Convert/Info.pm (output): Move block of code dealing with split output from the end to the beginning of a loop, but do not execute it the first time around by checking a variable. This allows changing the loop to a simple foreach loop rather than popping from an array each time round. 2024-01-18 Gavin Smith <gavinsmith0123@gmail.com> Change handling of blank lines between Info nodes * tp/Texinfo/Convert/Info.pm (format_node): Do not check 'empty_lines_count' or add a newline at the beginning of the node if it is zero. This makes the conversion of the node more independent of other nodes and sections of the Info file. (output): Each time after calling 'convert_output_unit', add an extra newline to the output if the result did not end in an empty line. This compensates for not adding a line at the beginning in format_node. Do not output an extra newline before the tag table, just after the last node. * tp/Texinfo/Convert/Plaintext.pm (_convert): Ensure that the 'before_node_section' ends in a newline by calling ensure_end_of_line, as it is no longer altered in format_node. This is aimed towards eliminating 'empty_lines_count' counting with simplicity and performance benefits. 2024-01-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Common.pm (debug_print_tree): Also print 'unit_contents' keys to allow printing an "output unit". 2024-01-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (sort_element_counts): call conversion_initialization and conversion_finalization. * tp/Texinfo/Convert/TexinfoMarkup.pm (output, convert): give document argument to conversion_initialization. * tp/Texinfo/Convert/Converter.pm (conversion_initialization) (converter), tp/Texinfo/Convert/DocBook.pm (conversion_initialization), tp/Texinfo/Convert/HTML.pm (conversion_initialization), tp/Texinfo/Convert/LaTeX.pm (conversion_initialization), tp/Texinfo/Convert/Plaintext.pm (conversion_initialization), tp/Texinfo/Convert/TexinfoMarkup.pm (conversion_initialization), tp/t/test_utils.pl (convert_to_*), tp/texi2any.pl: call set_document in conversion_initialization, do not pass a document to converter initialization. * tp/Texinfo/Convert/Text.pm (converter, output): get document in output. Do not st global_information and global_commands_information in converter state, they are only used in output(). * tp/t/convert_to_text.t: call set_document to set converter document. 2024-01-17 Gavin Smith <gavinsmith0123@gmail.com> Find menu with hide-note-references=On * info/session.c (info_find_menu): If "*Menu:" marker not found, try to move cursor to the first menu entry in the node. Report from Bugsy Abatantuono <bugsyabatantuono@proton.me>. 2024-01-17 Gavin Smith <gavinsmith0123@gmail.com> * doc/texinfo.texi (Reporting Bugs): Change reference to "Change Log" node in "standards" manual to "Change Logs" as the latter is the name that is used in that manual. 2024-01-17 Gavin Smith <gavinsmith0123@gmail.com> Fix info 'invalid' key mapping segfault * info/infodoc.c (dump_map_to_text_buffer): Check for "invalid" entry in key map by checking if a function pointer is null. This prevents a crash in 'function_documentation' from dereferencing a null pointer if an "invalid" entry was provided in the infokey file. Report from Bugsy Abatantuono <bugsyabatantuono@proton.me>. 2024-01-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_load_htmlxref_files): use $Texinfo::ModulePath::top_srcdir to setup search directory with TEST to avoid using the document information before calling output or convert. * tp/Texinfo/Convert/HTML.pm (converter_initialize): use converter_descriptor and not document_descriptor to verify if the converter will be found in XS. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize) (html_initialize_output_state): move code needing information in document to html_initialize_output_state. * tp/Texinfo/XS/convert/converter.c (free_generic_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/main/get_perl_info.c (get_line_message): add small_strings in converter to store small strings from get_line_message. * tp/Texinfo/Convert/Converter.pm (set_document, converter): call set_document after converter_initialize. Set convert_text_options in set_document. 2024-01-17 Patrice Dumas <pertusus@free.fr> Add initialization and finalization of conversion, separate document from converter * tp/Texinfo/Convert/Converter.pm (conversion_initialization) (conversion_finalization, output), tp/Texinfo/Convert/DocBook.pm (converter_initialize, conversion_initialization, convert) (conversion_initialization, output), tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides, _XS_html_converter_initialize) (converter_initialize, conversion_initialization) (conversion_finalization, convert, output), tp/Texinfo/Convert/IXIN.pm (output_ixin), tp/Texinfo/Convert/Info.pm (output), tp/Texinfo/Convert/LaTeX.pm (conversion_initialization, output) (convert, convert_to_latex_math), tp/Texinfo/Convert/Plaintext.pm (conversion_initialization, converter_initialize, convert_output_unit) (convert), tp/Texinfo/Convert/TexinfoMarkup.pm (converter_initialize) (conversion_initialization, output, convert), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv) (html_initialize_output_state, html_conversion_finalization), tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv, html_conversion_initialization_sv), tp/t/accents.t: use systematically conversion_initialization and conversion_finalization at the beginning and end of output and convert to initialize and finalize the conversion of one document. Keep in converter_initialize only the code that do not depend on a document. In HTML.pm rename existing functions, _initialize_XS_NonXS_output_state as conversion_initialization and _finalize_output_state as conversion_finalization, and move code from converter_initialize. In Plaintext.pm, this replaces _initialize_converter_state. * tp/Texinfo/Convert/Converter.pm (set_document), tp/Texinfo/Convert/HTML.pm (get_value): rename 'value' key in converter as 'document_values'. * tp/Texinfo/Convert/Converter.pm (%XS_overrides, set_document) (_XS_set_document, converter), tp/Texinfo/XS/convert/ConvertXS.xs (converter_set_document), tp/Texinfo/XS/main/get_perl_info.c (converter_set_document, converter_initialize): move setting the document of a converter to a separate function, for now called from converter. * tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state), tp/Texinfo/XS/main/get_perl_info.c (find_element_extra_index_entry_sv): handle NUL document. * tp/Texinfo/Convert/Plaintext.pm (pop_top_formatter) (process_footnotes, conversion_finalization): add a function to pop the top formatter and use it in conversion_finalization. * tp/Texinfo/Convert/DocBook.pm (convert_tree): minor change in code. * tp/Texinfo/Convert/IXINSXML.pm (converter_initialize): pass document, not tree. 2024-01-16 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory): make $output_format non-optional. Update callers. 2024-01-16 Gavin Smith <gavinsmith0123@gmail.com> Prevent M-x visit-menu segfault * info/session.c (info_visit_menu): Copy the node structure from the current window before calling info_follow_reference, similarly to code in info_split_window. This prevents a shared node in the window history, leading to possible memory problems. Segmentation fault following 'M-x visit-menu' and 'M-x delete-window' reported by Bugsy Abatantuono <bugsyabatantuono@proton.me>. 2024-01-15 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (text_convert_tree): handle an undefined options_in. * tp/Texinfo/Convert/Text.pm (_initialize_options_encoding) (copy_options_for_convert_text, converter): do not use copy_options_for_convert_text in converter to setup text options, as the options are very similar to converter options, even if they are of a different nature. Add _initialize_options_encoding to setup enable_encoding both for converter and in copy_options_for_convert_text. 2024-01-15 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Info.pm (output): Rename a variable to be less confusing. Explain in comment that setting 'text_before_first_node' was a side-effect of calling convert_output_unit, and explain the purpose of saving it. Reorder code slightly for clarity. No functional changes intended. 2024-01-15 Patrice Dumas <pertusus@free.fr> * doc/tp_api/Makefile.am (texi2any_internals_dependencies): add Indices.pm. 2024-01-15 Patrice Dumas <pertusus@free.fr> * tp/Makefile.am (dist_modules_DATA), tp/Texinfo/Indices.pm, tp/Texinfo/IndicesXS.pm, tp/Texinfo/XS/Makefile.am (StructuringTransfoXS_la_SOURCES, StructuringTransfoXS_la_CPPFLAGS), (xs_LTLIBRARIES, IndicesXS_la_*), tp/Texinfo/XS/convert/IndicesXS.xs, tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs: move code related to indices to a new XS file convert/IndicesXS.xs out of StructuringTransfoXS.xs. 2024-01-15 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Indices.pm, tp/Texinfo/Structuring.pm, tp/Makefile.am (dist_modules_DATA): move code related to indices to a new file, Indices.pm out of Structuring.pm. 2024-01-15 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_set_heading_commands_targets), tp/Texinfo/XS/convert/convert_html.c (heading_commands_list): sort in perl and setup heading_commands_list order such as to have the same order in perl and XS and obtain the same disambiguation of targets. * tp/Texinfo/Convert/Converter.pm (converter), tp/Texinfo/Convert/HTML.pm (_set_root_commands_targets_node_files): use 'labels_list' instead of 'identifiers_target' for efficiency and to be more like XS code. 2024-01-15 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_get_css_elements_classes): set the values based on global selectors when there are only global selectors. * tp/Makefile.tres, tp/t/html_tests.t (command_in_node_redirection*): add test of commands in node redirection @-commands and in documment @top, to test CSS rules output. 2024-01-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line): map gb2312 to euc-cn to get the same output as with perl Encode mime_name. Note that this mapping looks wrong, as GB2312 seems to be the preferred mime name in IANA encoding registry https://www.iana.org/assignments/character-sets/character-sets.xhtml but we still do it to match with the Perl output. 2024-01-14 Patrice Dumas <pertusus@free.fr> * contrib/mass_test/check_perlVSC.sh: do only the manual given in argument if an argument is given. 2024-01-14 Patrice Dumas <pertusus@free.fr> * contrib/mass_test/*.sh: add copyright notices. * contrib/mass_test/extract_manuals.sh: call sed portably. 2024-01-14 Patrice Dumas <pertusus@free.fr> contrib/mass_test for tests on manuals found on GNU website * contrib/mass_test/get_manuals.sh, contrib/mass_test/extract_manuals.sh: scripts to download and extract manuals found on the GNU website in software/*/manual/*.texi*. * contrib/mass_test/setup_reference_perlVSC.sh, contrib/mass_test/check_perlVSC.sh: check C against perl HTML output. 2024-01-14 Gavin Smith <gavinsmith0123@gmail.com> * tp/t/21multitable.t (fullwidth_in_prototype): New test. * tp/t/21multitable.t: add "use utf8;" declaration in order to use UTF-8 in test case. 2024-01-14 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (add_text_to_count): Remove function, replacing all calls with calls to _stream_output or _stream_output_encoded. 2024-01-13 Gavin Smith <gavinsmith0123@gmail.com> Encode output and count bytes in Plaintext.pm * tp/Texinfo/Convert/Plaintext.pm (_stream_output, _stream_result) (_stream_output_encoded, _stream_byte_count, _stream_encode): New functions. Convert results of conversion to output encoding as the conversion is done, accumulating the result. This simplifies keeping track of byte offsets in files (for nodes and anchors in the tag table), and potentially has performance benefits as output text does not need to be converted an extra time for the sole purpose of counting bytes. It is potentially more reliable as byte offsets will be correct automatically rather than having to be kept up-to-date separately from the conversion result. (converter_initialize): Initialise result string in count context. (_count_added, _count_bytes): Remove. (add_text_to_count): Make this a simple wrapper around _stream_output with comment to remove in future. (update_count_context): Remove function. Callers updated. (add_location, _update_locations_counts): Call _stream_byte_count to get byte count, rather than accessing count context hash directly. * tp/Texinfo/Convert/Plaintext.pm (_convert_output_unit): Update. Clear current result string before converting. (_convert_tree): Update. Use a new count context to capture conversion result. (_convert_line_new_context): Return encoded text. Return display width as well as end line count of result. Callers updated. (_string_width_encoded): New. (_convert) <multitable row>, (process_printindex, _text_heading): Use _string_width_encoded to get display width of already-encoded text. (convert_new_context): New. (_convert) <menu_entry_node, menu_entry_name>: Use convert_new_context to capture result of conversion. * tp/Texinfo/Convert/Plaintext.pm (ensure_end_of_line): Do not take a string argument; instead, check the output stream for an end of line. (_align_lines): Take a text argument that is already encoded. (_align_environment): Do not update byte count, as it is done in calling code. (node_name): Encode the returned node name. Return column width of result, rather than byte count. Callers updated. * tp/Texinfo/Convert/Plaintext.pm (_convert, convert_line) (_add_newline_if_needed, process_footnotes, format_contents) (_menu, process_printindex, format_node, _anchor) (ensure_end_of_line, _text_heading), * tp/Texinfo/Convert/Info.pm (format_node): Do not return any return value. Call _stream_output or _stream_output_encoded with text to be added to the result of the conversion. * tp/Texinfo/Convert/Info.pm (output): Update to use new _stream_output interface. (_info_header): Return an encoded string and do not change the current count context. * tp/Texinfo/Convert/Plaintext.pm (_decode): New function. * tp/Texinfo/Convert/Info.pm (format_node): Use _decode for printing an error message using an already encoded node name. * tp/Texinfo/Translations.pm (gdt_string_columns, gdt_string_encoded): Rename to gdt_string_encoded, and encode the returned string. * tp/Texinfo/Common.pm (output_files_disable_encoding): Add function to disable encoding of output, as the output from the converter is already encoded. (output_files_open_out): Obey this setting. * tp/Texinfo/Convert/Plaintext.pm (converter_initialize): Call output_files_disable_encoding. 2024-01-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.c (item_line_parent): use element_builtin_cmd. * tp/Texinfo/XS/main/utils.c (informative_command_value): if there is only one rawline argument, returns it. Return a newly allocated text only if there is more than one argument. In that case, the returned text won't be freed, but this is not an issue as it could only happen with @set, which is ignored. Add, modify, change status of TODO/FIXME. 2024-01-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs: add warn strings fior all the functions that are fully overriden, and modify comments for the other functions. 2024-01-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Transformations.pm (_new_node): if $XS_structuring, abort as the output cannot be correct. * tp/t/automatic_nodes.t ($XS_structuring): set $XS_structuring instead of $with_XS and skip tests calling _new_node if $XS_structuring is set. Update comment on _new_node. 2024-01-14 Patrice Dumas <pertusus@free.fr> * Texinfo/Convert/Converter.pm, Texinfo/Structuring.pm: add explicit scalar(). 2024-01-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Text.pm (_convert): switch arguments and make options argument non optional. 2024-01-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES), tp/Texinfo/XS/main/option_types.h (enum direction_unit_direction) (FIRSTINFILE_*, NODE_DIRECTIONS_OFFSET, NON_SPECIAL_DIRECTIONS_NR) (enum button_specification_type, enum button_information_type) (enum button_function_type, BUTTON_SPECIFICATION_LIST) (BUTTON_SPECIFICATION_INFO, BUTTON_SPECIFICATION, BUTTON_FUNCTION) (FORMATTED_BUTTON_INFO, DIRECTION_ICON_LIST, OPTION), tp/maintain/regenerate_C_options_info.pl: move definitions related to an option to a separate header file, option_types.h. Update users. 2024-01-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/call_perl_function.c (call_nodenamenormalization_unicode_to_transliterate) (call_latex_convert_to_latex_math): convert returned strings to UTF-8. Use strndup instead of strdup using the len set by SvPV* functions. * tp/Texinfo/Convert/Texinfo.pm: move functions around. * tp/Texinfo/XS/convert/ConvertXS.xs (plain_texinfo_convert_tree): set warning string get_sv_tree_document argument. 2024-01-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/Makefile.am (ConvertXS_la_SOURCES), tp/Texinfo/XS/convert/ConvertXS.xs (text_convert_tree): call directly convert_to_text. remove convert/convert_text.c. * tp/Texinfo/XS/main/convert_utils.c (encoded_input_file_name), tp/Texinfo/XS/main/utils.c (get_encoding_conversion, decode_string) (encode_string): add some const. 2024-01-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/Makefile.am (ConvertXS_la_SOURCES), tp/Texinfo/XS/convert/ConvertXS.xs (plain_texinfo_convert_tree): remove convert/convert_plain_texinfo.c, call convert_to_texinfo directly. 2024-01-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c: use strndup instead of strdup and text_append_n instead of text_append using the len set by SvPV* functions. 2024-01-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (call_file_id_setting*): use newSVpv_utf8 to pass strings if they could be encoded, and convert returned strings to UTF-8. 2024-01-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/targets.c (set_labels_identifiers_target) tp/Texinfo/XS/main/tree_types (LABEL), tp/Texinfo/XS/parsetexi/labels.c (register_label): if a label element is a duplicate, add a reference to the element used in the LABEL structure used in labels_lists. * tp/Texinfo/XS/convert/convert_html.c (set_root_commands_targets_node_files): use labels_lists instead of identifiers_target to set up targets to process in the document order, to have less sorting to do later on in sort_cmd_targets. 2024-01-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_no_arg_command): use letter_no_arg_commands to determine if the command name upper-cased string is a command name too. * tp/Texinfo/XS/convert/converter.c (no_brace_command_accent_upper_case): mapping of lower case letter no arg commands to the corresponding upper case commands. * tp/Texinfo/XS/convert/convert_html.c (HTML_COMMAND_STRUCT) (convert_no_arg_command, css_string_convert_no_arg_command) (html_format_init): add upper case command information in HTML_COMMAND_STRUCT based on no_brace_command_accent_upper_case. 2024-01-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/document.c (register_document_convert_index_text_options), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (setup_index_entry_keys_formatting): free previously set convert_index_text_options before replacing. * tp/Texinfo/XS/convert/convert_html.c (add_to_unit_file_name_paths): simplify. * tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files): use unit_file_name_paths entry directly as filename. * tp/Texinfo/XS/convert/convert_html.c (html_convert_output): call text_reset only if needed. * tp/Texinfo/XS/convert/convert_html.c (html_convert_output): setup conversion to output encoding only if it is not utf-8. 2024-01-12 Patrice Dumas <pertusus@free.fr> * NEWS: add the converters in C and use of TEXINFO_XS_CONVERT environment variable to NEWS, now that the HTML C conversion code is complete. 2024-01-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/unicode.h (DIACRITIC_UNICODE), tp/maintain/setup_converters_code_tables.pl (unicode_diacritics): add hexadecimal representation of diacritics to the unicode_diacritics table. * tp/Texinfo/XS/convert/convert_html.c (set_case_if_only_word_characters) (html_accent_entities_html_accent_internal) (after_escaped_characters, css_string_accent) (css_string_convert_accent_command, html_converter_initialize): implement css_string_convert_accent_command in C. Create set_case_if_only_word_characters based on html_accent_entities_html_accent_internal tu use common code. 2024-01-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_text.c: make two functions static. 2024-01-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Text.pm: move functions around. * tp/Texinfo/XS/main/convert_to_text.c (text_brace_no_arg_command): rename brace_no_arg_command as text_brace_no_arg_command. * tp/Texinfo/XS/main/convert_to_text.c: move code around, make functions static or declare them in .h. 2024-01-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/indices_in_conversion.c (index_entry_element_sort_string): always initialize returned text to the empty string. 2024-01-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (xml_accent), tp/Texinfo/Convert/HTML.pm (_css_string_accent), tp/Texinfo/Convert/NodeNameNormalization.pm (_convert): do not use ascii_accent as a last resort formatting, return directly the accent command argument as the last resort situation should only happen with dotless and a non recognized argument for dotless. * tp/Texinfo/Convert/Text.pm (_ascii_accent): make ascii_accent private, renamed to _ascii_accent. * tp/Texinfo/Convert/Text.pm (@text_indicator_converter_options): remove 'DEBUG', it is never used. * tp/Texinfo/Convert/Text.pm: remove error() function as converters are no longer Texinfo::Report objects. 2024-01-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Structuring.pm (%XS_overrides, %XS_convert_overrides) ($XS_convert, import): override index_entry_element_sort_string and setup_index_entry_keys_formatting only if XS is used for conversion. 2024-01-10 Patrice Dumas <pertusus@free.fr> * doc/texinfo.texi b/doc/texinfo.texi (@code{@@link}): add a missing not. Replace these by some as it is not clear what these refers to. 2024-01-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Structuring.pm (setup_sortable_index_entries): remove the $silent argument, not used. * tp/Texinfo/XS/main/utils.c (set_expanded_formats_from_options): add to be able to set expanded formats based on EXPANDED_FORMATS customization option, without a converter information. * tp/Texinfo/XS/convert/indices_in_conversion.c (index_entry_element_sort_string), tp/Texinfo/XS/main/get_perl_info.c (find_index_entry_sv, get_sv_index_entries_sorted_by_letter), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (index_entry_element_sort_string): return as reference the INDEX in find_index_entry_sv. Pass in_code argument to index_entry_element_sort_string and use it to modify the text options directly in the function. * tp/Texinfo/XS/main/convert_to_text.c (copy_options_for_convert_text) (copy_converter_options_for_convert_text, destroy_text_options), tp/Texinfo/XS/main/convert_to_text.h (TEXT_OPTIONS), tp/Texinfo/XS/main/get_perl_info.c (converter_initialize): use OPTIONS in copy_options_for_convert_text argument, and add another variant with a converter in argument, copy_converter_options_for_convert_text. * tp/Texinfo/XS/main/document.c (register_document_convert_index_text_options) (destroy_document_information_except_tree), tp/Texinfo/XS/convert/converter.c (free_generic_converter), tp/Texinfo/XS/main/document_types.h (DOCUMENT), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add convert_index_text_options to register text options used for index sorting keys conversion. * tp/Texinfo/Structuring.pm (%XS_overrides), tp/Texinfo/XS/main/convert_to_text.c (set_additional_index_entry_keys_options) (setup_index_entry_keys_formatting) (setup_converter_index_entry_keys_formatting), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (setup_index_entry_keys_formatting, index_entry_element_sort_string): add an override for setup_index_entry_keys_formatting that triggers initializing TEXT_OPTIONS for a converter or a document to be used for index sorting in index_entry_element_sort_string. * tp/t/test_sort.t: call register_XS_document_main_configuration to have the customization available in document for the setup_index_entry_keys_formatting override. 2024-01-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.c (copy_strings, set_conf_string) (set_informative_command_value): add copy_strings and set_conf_string functions. Use set_conf_string in set_informative_command_value. * tp/Texinfo/XS/main/convert_to_text.c (copy_options_for_convert_text): allocate text options fields that can be reset if converter options are reset. * tp/Texinfo/XS/main/convert_to_text.c (copy_options_for_convert_text, text_set_options_encoding) (text_set_options_encoding_if_not_ascii, text_reset_options_encoding): remove copy_options_for_convert_text enable_encoding_if_not_ascii argument. Add text_set_options_encoding, text_set_options_encoding_if_not_ascii and text_reset_options_encoding to modify text options encoding field. * tp/Texinfo/XS/convert/convert_html.c (external_node_href) (convert_def_line_type, html_prepare_converted_output_info) (convert_to_html_internal), tp/Texinfo/XS/convert/converter.c (free_generic_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/main/get_perl_info.c (converter_initialize): add convert_text_options field to the CONVERTER, set it in converter_initialize and free it in free_generic_converter. Use those text options in HTML formatting and use the new text_*set_options* functions to set and reset the text options, instead of settng up new text options each time one is used. * tp/Texinfo/XS/main/get_perl_info.c (converter_initialize), tp/Texinfo/XS/main/utils.c (set_output_encoding): implement set_output_encoding without setting the perl specific variable. Set output encoding early enough to have it available for copy_options_for_convert_text call, as the corresponding perl function is called just ater. 2024-01-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Text.pm (copy_options_for_convert_text): replace the $enable_encoding_if_not_ascii argument by additional options argument. Change return to be a reference on an hash, not an hash. Update callers. 2024-01-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state): do not return anything. This probably fixes a wrong refcount too. 2024-01-08 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (converter), tp/Texinfo/Convert/LaTeX.pm (converter_initialize), tp/Texinfo/Convert/Plaintext.pm (converter_initialize): set 'convert_text_options' conversion to text options state with copy_options_for_convert_text, to be used in converters instead of calling copy_options_for_convert_text each time conversion to text options are needed. Remove the equivalent code from specific converters. * tp/Texinfo/Convert/Text.pm (set_options_code, reset_options_code) (set_options_encoding_if_not_ascii, set_options_encoding) (reset_options_encoding, convert_to_text), tp/Texinfo/XS/main/get_perl_info.c (copy_sv_options_for_convert_text): add functions to modify the conversion to text options without redoing the whole options hash. Do not use 'code' in text options to set code, only set_options_code(). * tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm, tp/Texinfo/Convert/TexinfoMarkup.pm, tp/Texinfo/Convert/TextContent.pm, tp/Texinfo/Structuring.pm, tp/ext/epub3.pm, tp/ext/highlight_syntax.pm, tp/init/chm.pm: do not use copy_options_for_convert_text in converters, instead use converter 'convert_text_options' and modify it and reset it with the set_options_* and reset_options_* new functions of Texinfo/Convert/Text.pm. 2024-01-08 Patrice Dumas <pertusus@free.fr> * tp/t/accents.t: initialize converter with _initialize_XS_NonXS_output_state. 2024-01-08 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (index_entry_element_sort_string): free sort_string. * tp/Texinfo/Convert/Text.pm (text_accents, brace_no_arg_command) (_convert): use 'set_case' for case, that can be positive for upper casing and negative for lower casing instead of 'sc', as in XS. * tp/Texinfo/Structuring.pm (setup_sortable_index_entries): rename $options as $convert_text_options and set code directly and pass $convert_text_options directly instead of copying. * tp/Texinfo/Convert/LaTeX.pm (_prepare_indices, _index_entry): set index_formatting_text_options state once for all in _prepare_indices instead of for each index entry. Set code directly in the state and pass the state insetad of copying it in _index_entry. * tp/Texinfo/XS/main/convert_to_text.c (destroy_text_options), tp/Texinfo/XS/main/get_perl_info.c (copy_sv_options_for_convert_text): if an XS converter is associated to the text optins, set it in TEXT_OPTIONS and directly use its conf for other_converter_options. Do not destroy other_converter_options if converter is set. Set self_converter_options only if other_converter_options is not set. * tp/Texinfo/XS/main/convert_to_text.c (text_accents_options) (text_options): use static text_accents_options in text_options instead of allocating and freeing. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Structuring.pm (setup_index_entry_keys_formatting): remove ascii_punctuation obsolete option set. * tp/Texinfo/Structuring.pm (index_entry_element_sort_string) (_index_entry_element_sort_string_key) (setup_sortable_index_entries), tp/t/test_sort.t, tp/t/test_utils.pl: add an argument with document information for XS for index_entry_element_sort_string and _index_entry_element_sort_string_key to retrieve the document descriptor in XS. Use setup_sortable_index_entries $customization_information as a source of that information. If it is a converter based on Texinfo::Convert::Converter, the information is there, if not, it needs to be added explcitely. Add the information explicitly setting 'document_descriptor' to document->document_descriptor() in test_sort.t and test_utils.pl. * tp/Texinfo/XS/convert/indices_in_conversion.c (index_entry_element_sort_string): implement in C. * tp/Texinfo/XS/main/get_perl_info.c (find_index_entry_sv): add based on get_sv_index_entries_sorted_by_letter code. * tp/Texinfo/XS/main/get_perl_info.c (copy_sv_options_for_convert_text): get 'code' from perl. * tp/Texinfo/XS/main/get_perl_info.c (find_index_entry_subentry) (subentry_hv_parent, find_subentry_index_command_sv) (find_element_from_sv): find subentry C element based on perl element, by finding the 'subentry parent' index entry C element going down subentry levels, and then find the C subentry element going up subentry levels. * tp/Texinfo/XS/main/get_perl_info.c (find_element_extra_index_entry_sv) (find_index_entry_associated_hv, find_element_from_sv): have find_element_extra_index_entry_sv return an index entry, such that the caller can find the element based on entry_associated_element or entry_element. Add find_index_entry_associated_hv to go through both entry_associated_element and entry_element to find the C element associated to a perl element. Use that code in find_element_from_sv. * tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (index_entry_element_sort_string): XS interface for index_entry_element_sort_string. Not used as it is slower than the perl... * tp/Texinfo/XS/main/get_perl_info.c (debug_print_element_hv) (debug_print_element_sv): add debug functions that print information on perl tree elements. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): always free entry_tree, found with valgrind. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_printindex_command), tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): convert subentries with seealso and seeentry too. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/ParserNonXS.pm (_handle_close_brace), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): asociate seealso and seeentry to the main index entry only, not to @subentry. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/ParserNonXS.pm (_set_non_ignored_space_in_index_before_command): fix a variable name. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), tp/Texinfo/ParserNonXS.pm (_end_line_misc_line): call _set_non_ignored_space_in_index_before_command in any case, enven is there is no extra information on @-commands letting space_in_index_before_command to be more independent of the extra information and where it is stored. * tp/Texinfo/ParserNonXS.pm (_end_line_misc_line) (_set_non_ignored_space_in_index_before_command): pass an argument to _set_non_ignored_space_in_index_before_command and change variable names. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/ParserNonXS.pm (_handle_line_command), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command): add 'subentry_parent' for @subentry to be able to easily find the containing subentry or index entry. * tp/Texinfo/ParserNonXS.pm (_handle_close_brace), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): associate the @seeentry and @seealso to the main index entry command in addition to a @subentry. * tp/Texinfo/Convert/LaTeX.pm (_index_entry): update to the change in tree. * tp/t/09indices.t (seealso_duplicate): also add a duplicate entry with @seeentry. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Structuring.pm (index_entry_element_sort_string) (_index_entry_element_sort_string_key, setup_sortable_index_entries): replace index_entry_sort_string by index_entry_element_sort_string, using the element associated to the index entry or @subentry as argument, and determining the sortas and content in the function. Update callers. * tp/Texinfo/Convert/LaTeX.pm (_index_entry): simplify code by using only an array of index entry element commands, for the main entry and the @subentry. Rename variables. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c (html_find_element_from_sv), tp/Texinfo/XS/main/get_perl_info.c (find_sorted_index_names_index_entry_extra_index_entry_sv) (find_document_index_entry_extra_index_entry_sv) (find_element_extra_index_entry_sv, find_root_command) (find_element_from_sv): separate HTML specific code from find_element_from_sv and move generic code to get_perl_info.c. Rename the function in get_html_perl_info.c as html_find_element_from_sv. Update callers. Merge find_index_entry_numbers_extra_index_entry_sv in find_index_entry_extra_index_entry_sv and rename find_index_entry_extra_index_entry_sv as find_sorted_index_names_index_entry_extra_index_entry_sv. Add find_document_index_entry_extra_index_entry_sv to find index entry element based on on DOCUMENT only. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Structuring.pm (index_entry_sort_string) (_index_entry_sort_string_key): have index_entry_sort_string return only the sort_string, not the sort_key used from the collator. Add _index_entry_sort_string_key that returns both the sort_string and the sort_key, meant to be used internally only. Update callers. * tp/Texinfo/Convert/LaTeX.pm (_index_entry): rename $sortas as $sort_string. 2024-01-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c (copy_sv_options_for_convert_text): use a FETCH macro to simplify code. * tp/Texinfo/Convert/Text.pm (convert_to_text, output), tp/Texinfo/XS/convert/ConvertXS.xs (text_convert_tree), tp/Texinfo/XS/main/get_perl_info.c (copy_sv_options_for_convert_text): pass text options directly to XS. Remove select_text_options. Remove code that cannot be reached. 2024-01-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize), tp/Texinfo/options_data.txt (XS_EXTERNAL_CONVERSION) (XS_EXTERNAL_FORMATTING), tp/t/test_utils.pl, tp/texi2any.pl: add customization variables that can also be set through environment variables to have perl and not C code used for formatting functions, with XS_EXTERNAL_FORMATTING set, and for conversion functions, with XS_EXTERNAL_CONVERSION set. Not documented for now, not clear if this should be kept in the long term. 2024-01-06 Gavin Smith <gavinsmith0123@gmail.com> * util/dir-example: Change Karl's email address to bug-texinfo@gnu.org. 2024-01-06 Patrice Dumas <pertusus@free.fr> * tp/Makefile.am (test_files), tp/t/init/test_css_info_functions.pm, tp/Makefile.tres, tp/t/html_tests.t (base_for_css_info_in_init_test) (text_css_info_in_init): add text_css_info_in_init, a test of css_add_info and css_set_selector_style use, and a test without the init file used, base_for_css_info_in_init_test, for comparison. 2024-01-06 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi (Simple Customization of CSS), tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (css_get_selector_style), tp/Texinfo/XS/convert/ConvertXS.xs (html_css_get_selector_style), tp/Texinfo/XS/convert/convert_html.c (html_css_get_selector_style): rename *css_selector_style functions as *css_get_selector_style. 2024-01-06 Patrice Dumas <pertusus@free.fr> * tp/t/18itemize.t (enumerate_argument, enumerate_argument_item): add test of @enumerate 0. 2024-01-06 Patrice Dumas <pertusus@free.fr> * po/Makevars (XGETTEXT_OPTIONS): fix index of message_list_command_warn and message_list_command_error, add message_list_document_*, noticed_line_warn and message_list_line_error_ext. * po/POTFILES.in: add tp/Texinfo/XS/convert/convert_html.c. update po files. 2024-01-06 Patrice Dumas <pertusus@free.fr> update po files 2024-01-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/structuring_transfo/transformations.c (reference_to_arg_internal, reference_to_arg_in_tree): add document as argument to reference_to_arg_in_tree and reference_to_arg_internal. Update callers. Remove destroyed element from document->internal_references. 2024-01-06 Patrice Dumas <pertusus@free.fr> * Pod-Simple-Texinfo/Makefile.am (AM_TESTS_ENVIRONMENT): set for out of source builds. * Pod-Simple-Texinfo/pod2texi.pl (BEGIN): Pod-Simple-Texinfo is not in builddir, but in srcdir. * Pod-Simple-Texinfo/prove.sh, Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t (BEGIN): use a similar setup as for other scripts to find the perl modules. 2024-01-06 Patrice Dumas <pertusus@free.fr> Fix memory leaks found with valgrind * tp/Texinfo/XS/convert/convert_html.c (html_default_format_css_lines): destroy css_element_classes. * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): do not reset multiple_pass_str. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_node_redirection_page, convert_style_command) (convert_def_line_type): free/destroy variables. * tp/Texinfo/XS/convert/convert_html.c (html_free_converter): free css info data. 2024-01-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_button): avoid 2 if for the most common case of ICONS not being set, instead recopy code. 2024-01-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (preformatted_cmd_list) (html_format_init, html_converter_initialize): use a COMMAND_STACK for preformatted_cmd, rename as preformatted_cmd_list and let the functions allocate memory. * tp/Texinfo/XS/convert/convert_html.c (convert_def_command) (commands_internal_conversion_table, def_cmd_list, html_format_init) (html_converter_initialize): put def commands command_id in def_cmd_list, implement convert_def_command and use it. 2024-01-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_def_command): move code to be with other commands conversion. * tp/Texinfo/XS/convert/convert_html.c (convert_def_item_type) (convert_table_definition_type, types_internal_conversion_table): implement convert_def_item_type and convert_table_definition_type in C. 2024-01-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/options_data.txt (CSS_REFS): set type to char_string_list as it is decoded in the main program. * tp/maintain/regenerate_C_options_info.pl: fix the name of char_string_list. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_css_lines): fix output and css_element_classes can be 0. * tp/Texinfo/XS/convert/convert_html.c (format_css_lines): use html_default_format_css_lines. 2024-01-06 Patrice Dumas <pertusus@free.fr> XS interface for getting/setting CSS information * tp/Texinfo/Convert/HTML.pm (_prepare_css): use css_add_info instead of accessing directly css_rule_lines and css_import_lines. * tp/Texinfo/XS/convert/convert_html.c (sort_css_element_class_styles) (html_css_set_selector_style, html_css_selector_style) (html_css_add_info, html_css_get_info), tp/Texinfo/XS/convert/convert_html.h (enum css_info_type), tp/Texinfo/XS/main/converter_types.h (CSS_SELECTOR_STYLE_LIST) (CONVERTER): add functions and data fields to implement the css information getting/setting interface. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_initialize_output_state), tp/Texinfo/XS/convert/ConvertXS.xs (html_css_add_info, html_css_set_selector_style, html_css_get_info) (html_css_selector_style), tp/Texinfo/XS/convert/convert_html.c (css_info_type_names, html_converter_initialize) (html_converter_prepare_output), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv, html_converter_prepare_output_sv) (html_get_css_info_spec): add an XS interface for css information setting/getting. Get css_element_class_styles earlier from perl. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_css_lines): implement. Not used. 2024-01-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_node_redirection_page): convert the body before the header in case there is CSS to be collected. Add filename argument. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_node_redirection_page): add. * tp/Texinfo/XS/convert/convert_html.c (add_new_css_page) (collect_css_element_class, html_get_css_elements_classes) (html_set_pages_files, setup_output_simple_page) (html_reset_converter), tp/Texinfo/XS/main/converter_types.h (PAGES_CSS_LIST): add the possibility to add more files to self->page_css in addition to output files. Use page_name for those file names, otherwise it is 0 for output units found with their number/index. Only use the latest added file, under the assumption that each file not associated to output units are processed sequentially. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_prepare_node_redirection_page, output), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_node_redirection_page), tp/Texinfo/XS/convert/convert_html.c (html_prepare_node_redirection_page, format_node_redirection_page): setup a function to be overriden and an override wrapping setting the current file and calling format_node_redirection_page. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_node_redirection_page, format_node_redirection_page): implement in C. * tp/Makefile.am (test_files), tp/Makefile.tres, tp/t/html_tests.t (css_in_node_redirection_page), tp/t/init/css_in_node_redirection_page.pm: test CSS in node redirection file. 2024-01-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): create entry_ref_tree only after making sure that the entry is formatted. 2024-01-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_float_command) (convert_quotation_command): free cancelled pending_formatted_inline_content. * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): destroy elements created for subentries formatting. 2024-01-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_element_footer): rearrange code for rules. Make a condition clearer. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_element_footer): make element argument const. * tp/Texinfo/XS/convert/convert_html.c: move functions round. * tp/Texinfo/XS/convert/convert_html.c (word_number_more_than_level) (html_default_format_element_footer, format_element_footer): implement html_default_format_element_footer. 2024-01-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (prepare_index_entries_targets): do not reset the parent of the index element. * tp/Texinfo/XS/convert/convert_html.c (html_accent_entities_html_accent_internal, convert_item_command) (convert_tab_command, convert_preformatted_type, convert_row_type), tp/Texinfo/XS/main/unicode.c (unicode_accent): call element_builtin_cmd where a command could be user-defined. * tp/Texinfo/XS/convert/convert_html.c (convert_item_command) (convert_printindex_command): free variables (found with valgrind). * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal): improve debug messages. 2024-01-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_element_footer): to count word split at splaces only, no need to have true words in the array, it is only used for the counting. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_menu_comment_type) (convert_before_item_type, types_internal_conversion_table): implement convert_menu_comment_type and convert_before_item_type. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_menu_entry_type): use a condition with node_content before using it. 2024-01-04 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <process contents>: Remove zeroing of 'empty_lines_count' from here for 'preformatted' and 'rawpreformatted' elements also. <close preformatted>: Move it into a code block dealing with other preformatted content. Base the zeroing on inspection of the document tree rather than conversion output. 2024-01-04 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <process contents>: Limit zeroing of 'empty_lines_count' to elements of type 'preformatted' or 'rawpreformatted'. Previously, this code was also used for processing the contents of whole @menu blocks (as the local variable '$preformatted' was set) but the two cases are quite different and not well handled by the same code. (_convert) <menu_entry>: Unconditionally zero $self->{'empty_lines_count'} when processing the 'menu_entry' element itself, which is contained within the @menu block. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_menu_entry_type): do not replace the menu_description with the nodedescription derived elements. Avoid using contents and not element. Rearrange code. * tp/Texinfo/XS/convert/convert_html.c (menu_entry_a) (simplify_text_for_comparison, convert_menu_entry_type) (types_internal_conversion_table): implement convert_menu_entry_type. * tp/Texinfo/XS/convert/convert_html.c (html_translate_names): reindent. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_definfoenclose_type) (convert_multitable_head_type, convert_multitable_body_type) (types_internal_conversion_table): implement convert_definfoenclose_type, convert_multitable_head_type and convert_multitable_body_type. Move code around. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_balanced_braces_type) (convert_index_entry_command_type, types_internal_conversion_table): implement convert_balanced_braces_type and convert_index_entry_command_type. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.c (free_option): free icons and strings, found with valgrind. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_preformatted_class): fix prototype. * tp/Texinfo/Convert/HTML.pm (_convert_preformatted_type): rearrange code. * tp/Texinfo/XS/convert/convert_html.c (trim_trailing_content): add from convert_tab_command. * tp/Texinfo/XS/convert/convert_html.c (convert_paragraph_type): change code to use a TEXT and free memory in all the situations. * tp/Texinfo/XS/convert/convert_html.c (preformatted_class) (convert_preformatted_type, types_internal_conversion_table): add preformatted_class, implement convert_preformatted_type. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_paragraph_type), (types_internal_conversion_table): implement convert_paragraph_type. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm, tp/Texinfo/XS/convert/convert_html.c: move functions around, to group better commands formatting and types formatting. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_button) (_default_format_special_body_about): avoid calling get_conf multiple times. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/build_perl_info.c (html_build_direction_icons): return the icon as value. * tp/maintain/regenerate_C_options_info.pl (build_sv_option): return icons. * tp/Texinfo/Convert/HTML.pm (_default_format_special_body_about): check if get_conf('ACTIVE_ICONS') is defined before using it. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_XS_reset_output_init_conf), tp/Texinfo/XS/convert/ConvertXS.xs (reset_output_init_conf), tp/Texinfo/XS/main/get_perl_info.c (reset_output_init_conf): remove warn_string argument of reset_output_init_conf, always use one. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_XS_reset_output_init_conf): define for Non XS. * tp/Texinfo/XS/main/utils.c (set_informative_command_value): rearrange code. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_converted_output_info): do not copy configuration from perl, it should be already set in XS through the overriden functions. * tp/Texinfo/XS/main/get_perl_info.c (init_copy_sv_options) (copy_converter_conf_sv): rename copy_sv_options as init_copy_sv_options and recopy_converter_conf_sv as copy_converter_conf_sv. Update callers. * tp/Texinfo/XS/main/get_perl_info.c (copy_converter_conf_sv) (html_get_direction_icons_sv), tp/Texinfo/XS/main/utils.c (html_clear_direction_icons, clear_option), tp/maintain/regenerate_C_options_info.pl (clear_options): add the possibility to clear options without freeing them with clear_option and clear_options. Do that in copy_converter_conf_sv if the conf is already set. Allocate icons in html_get_direction_icons_sv only if the number was 0. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_options) (get_sv_configured_options, copy_converter_conf_sv, set_conf) (force_conf), tp/maintain/regenerate_C_options_info.pl (set_option_key_configured): separate setting configured field, with get_sv_configured_options and set_option_key_configured, from setting options values. Add a force argument to functions to force setting options by ignoring the option configured field if set. * tp/Texinfo/XS/main/get_perl_info.c (converter_initialize): call directly new_options and call copy_converter_conf_sv to copy options values. 2024-01-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (converter, set_conf), tp/Texinfo/XS/convert/converter.c (set_global_document_commands), tp/Texinfo/XS/main/converter_types.h (OPTION), tp/Texinfo/XS/main/get_perl_info.c (get_sv_options), tp/Texinfo/XS/main/utils.c (set_informative_command_value), tp/maintain/regenerate_C_options_info.pl: rename 'set' as 'configured'. 2024-01-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): call recopy_converter_conf_sv in html_converter_initialize_sv as soon as format specific information has been gathered. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_XS_reset_output_init_conf, output), tp/Texinfo/XS/convert/ConvertXS.xs (reset_output_init_conf) (html_prepare_conversion_units), tp/Texinfo/XS/main/get_perl_info.c (reset_output_init_conf): add a specific override, reset_output_init_conf called after 'output_init_conf' is reset instead of doing it in html_prepare_conversion_units. Remove set_output_converter_sv, which did it previously. 2024-01-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/converter.c (copy_option, new_option_value) (command_init, set_global_document_commands): simplify command_init by simply copying the option. Properly initialize all the fields in new_option_value. Add copy_option to copy an option in another and use it in set_global_document_commands. Only copy option if set field is not on. 2024-01-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.h: remove COMMAND_OPTION_REF and COMMAND_OPTION_VALUE that are not used anymore. 2024-01-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/build_perl_info.c (build_string_list) (html_build_direction_icons): add. * tp/Texinfo/XS/main/converter_types.h (enum sv_string_type): move to converter_types.h. * tp/Texinfo/XS/*/*.c, tp/Texinfo/XS/convert/converter.c (new_option_value, command_init, set_global_document_commands), tp/Texinfo/XS/main/converter_types.h (enum global_option_type) (OPTION), tp/Texinfo/XS/main/utils.c (set_informative_command_value) (new_options, free_option, initialize_option), tp/Texinfo/XS/main/utils.h, tp/Texinfo/options_data.txt, tp/maintain/regenerate_C_options_info.pl, tp/maintain/regenerate_perl_options_info.pl: modify OPTIONS structure to have an intermediate OPTION structure that is a union of the possible types instead of the value being directly in OPTIONS. rename enum global_option_command_type as enum global_option_type and add all the possible types of global options. Use the types of global_option_type in options_data.txt instead of C types. Add free_option and initialize_option to handle all the possible types. * tp/Texinfo/Convert/Converter.pm (%XS_overrides, _XS_force_conf) (force_conf, _XS_get_conf, get_conf, converter), tp/Texinfo/XS/convert/ConvertXS.xs (force_conf, get_conf), tp/Texinfo/XS/main/build_perl_info.c (get_conf), tp/Texinfo/XS/main/get_perl_info.c (get_sv_options, copy_sv_options) (recopy_converter_conf_sv, set_conf, force_conf), tp/Texinfo/XS/main/utils.c (set_informative_command_value), tp/maintain/regenerate_C_options_info.pl: use XS to access customization variables preferrentially to make sure that perl and XS are synchronized. Override get_conf, and use a specific override for force_conf. Reorganize converter function code to use get_conf only when the XS converter has been initialized. Generate build_sv_option for get_conf. Add set field in OPTION to avoid overriding the value if not called as force_conf. Set set field based on perl value in converter. * tp/Texinfo/XS/convert/convert_html.c (convert_informative_command) (commands_internal_conversion_table): implement convert_informative_command. 2024-01-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (convert, output): use get_conf instead of accessing directly 'conf'. * tp/t/accents.t (test_enable_encoding): use set_conf instead of accessing directly 'conf'. 2024-01-03 Patrice Dumas <pertusus@free.fr> * tp/Makefile.am (Commands.pm, Options.pm): have generated files depend on the script generating them. 2024-01-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_enumerate_command): output a start of 0 with digits. * tp/Texinfo/Convert/HTML.pm (_convert_printindex_command): rearrange code. Avoid using contents separately from elements. Use an array and not an array reference for normalized_entry_levels, renamed as prev_normalized_entry_levels. Rename seenentry as seeentry. Use $subentry_level to determine the last level index early, do not remove the last level from @entry_trees. Redo the loop over levels to use only one index variable and use only one loop, not two. * tp/Texinfo/XS/convert/convert_html.c (get_element_root_command_element): add. * tp/Texinfo/XS/convert/convert_html.c (clear_normalized_entry_levels) (normalized_upper_case, printindex_letters_head_foot_internal) (convert_printindex_command, commands_internal_conversion_table): implement convert_printindex_command. 2024-01-03 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (ensure_end_of_line): Adjust implementation slightly so not to take a newline off before putting one back on. No functional changes intended. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_tab_command): reorder code. Rename $fraction as $percent. * tp/Texinfo/XS/convert/convert_html.c (convert_tab_command) (commands_internal_conversion_table): implement convert_tab_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.c (width_multibyte): start counting from the last end of line if there is one, to get the same result as in Perl Unicode.pm string_width where count is reset at a newline. 2023-12-31 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <menu entries>: Correctly include any DEL quoting characters in the count context. 2023-12-31 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Unicode.pm (string_width): Reset count at a newline. Add a comment saying what the different character classes mean. 2023-12-31 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Translations.pm (gdt_string_columns): Adjust to only count width of text that comes from the translated string, itself, not counting substituted text. * tp/Texinfo/Convert/Plaintext.pm (_text_heading): Count width of heading in three parts: the heading, the number, and additional text returned from gdt_string_columns. No functional changes intended. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (get_copiable_anchor): return 0 if there is no copiable anchor. Update callers. * tp/Texinfo/XS/convert/ConvertXS.xs (html_preformatted_classes_stack), tp/Texinfo/XS/convert/convert_html.c (HTML_COMMAND_STRUCT) (html_preformatted_classes_stack, register_pre_class_command) (reset_unset_no_arg_commands_formatting_context) (html_open_command_update_context, html_open_type_update_context) (html_convert_type_update_context), tp/Texinfo/XS/main/converter_types.h (HTML_DOCUMENT_CONTEXT): use a COMMAND_OR_TYPE_STACK for preformatted_classes_stack, with a command id for a preformatted command and a type id for a preformatted type. Turn to strings only when passing to perl. * tp/Texinfo/XS/convert/convert_html.c (conversion_function_cmd_conversion): new function that selects the function called for conversion based on a COMMAND_CONVERSION_FUNCTION argument, not on the command id or element argument. Allows to call a conversion function associated to a command conversion different from the command id or element arguments. * tp/Texinfo/XS/convert/converter.c (new_tree_added_elements) (clear_tree_added_elements, free_tree_added_elements) (destroy_tree_added_elements, new_element_added): move TREE_ADDED_ELEMENTS related functions from convert_html.c to converter.c to be usable more generally than in the html converter. * tp/Texinfo/XS/convert/converter.c (table_item_content_tree): add. * tp/Texinfo/XS/convert/convert_html.c (convert_item_command) (commands_internal_conversion_table): implement convert_item_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_item_command): rename $index_id as $index_entry_id. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_get_copiable_anchor): return undef if there is no copiable anchor. Update callers. * tp/Texinfo/Convert/HTML.pm (_default_format_heading_text): let _get_copiable_anchor determine if there is a copiable anchor or not. * tp/Texinfo/Convert/HTML.pm (_convert_item_command): reorganize code to set the result in order. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (table_item_content_tree): do not set the parent of the returned element. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (table_item_content_tree), tp/Texinfo/Convert/Plaintext.pm (_convert): remove table_item_content_tree contents element, instead always use $element->{'args'}->[0] in the function. Return the @-command used to format the item argument directly, undef if there is no command_as_argument. Update callers to set tree to $element->{'args'}->[0] if the return value is undef. Also do not modify the element returned in Plaintext.pm. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_multitable_command) (_convert_xtable_command): rearrange code. * tp/Texinfo/XS/convert/convert_html.c (convert_multitable_command) (convert_xtable_command), commands_internal_conversion_table): implement convert_multitable_command and convert_xtable_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_enumerate_command) (commands_internal_conversion_table): implement convert_enumerate_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_cartouche_command) (commands_internal_conversion_table): implement convert_cartouche_command. * tp/Texinfo/XS/convert/convert_html.c: move convert_itemize_command after convert_cartouche_command. 2023-12-31 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Info.pm (output) <Local Variables>: Output "Info-documentlanguage" if available. * doc/texinfo.texi (Info Format Local Variables): update * NEWS: mention 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_quotation_command): rearrange for clearer code and to avoid intermediary variable. * tp/Texinfo/XS/convert/convert_html.c (convert_quotation_command) (commands_internal_conversion_table): implement convert_quotation_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (float_name_caption): rename $caption as $caption_element. Use $substrings variable. * tp/Texinfo/Convert/HTML.pm (_convert_float_command): rename $caption as $caption_element. Avoid using contents when an element can be used. Reorder code, use less intermediate variables. * tp/Texinfo/XS/convert/convert_html.c (convert_float_command) (commands_internal_conversion_table), tp/Texinfo/XS/convert/converter.c (float_name_caption), tp/Texinfo/XS/convert/converter.h (FLOAT_CAPTION_PREPENDED_ELEMENT): add float_name_caption, implement convert_float_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_menu_command) (commands_internal_conversion_table): implement convert_menu_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_footnote_command): remove spurious end of line in identifiers. * tp/Texinfo/XS/convert/convert_html.c (convert_titlefont_command): destroy classes. * tp/Texinfo/XS/convert/convert_html.c (convert_listoffloats_command) (commands_internal_conversion_table): implement convert_listoffloats_command. * tp/Texinfo/Convert/HTML.pm (_convert_listoffloats_command): rename $caption as $caption_element. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_insertcopying_command) (commands_internal_conversion_table): implement convert_insertcopying_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_title_command) (convert_subtitle_command, commands_internal_conversion_table): implement convert_title_command and convert_subtitle_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_author_command), (commands_internal_conversion_table): implement convert_author_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_center_command) (commands_internal_conversion_table): implement convert_center_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_exdent_command) (commands_internal_conversion_table): implement convert_exdent_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_sp_command) (commands_internal_conversion_table): implement convert_sp_command. 2023-12-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_command_simple_block) (commands_internal_conversion_table): implement convert_command_simple_block. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_verbatiminclude_command, commands_internal_conversion_table): implement convert_verbatiminclude_command. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_displaymath_command) (commands_internal_conversion_table): implement convert_displaymath_command. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_verbatim_command) (commands_internal_conversion_table): implement convert_verbatim_command. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_indented_command): modify code to handle first the cases leading to returning contents or nothing. * tp/Texinfo/XS/convert/convert_html.c (convert_indented_command) (commands_internal_conversion_table): implement convert_indented_command. 2023-12-30 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <'menu_entry'>: Add explicit handling of 'menu_entry_leading_text' (for "* "), rather than leaving it to a catch-all case. Flush output for before outputting both 'menu_entry_node' and 'menu_entry_name' elements in order to capture node names or labels correctly and quote correctly if needed, without including any surrounding spaces. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_preformatted_command): modify code to handle first the cases leading to returning contents or nothing. * tp/Texinfo/Convert/HTML.pm (_indent_with_table): minor change in code. * tp/Texinfo/XS/convert/convert_html.c (indent_with_table) (convert_preformatted_command, preformatted_cmd, html_format_init) (html_converter_initialize): seup indented preformated, small block commands and preformatted_cmd list. Implement and use convert_preformatted_command in C. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize) (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): rename converter accent_formatted_cmd as accent_cmd. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_inline_command): do not modify $args. * tp/Texinfo/XS/convert/converter.c (convert_inline_command) (commands_internal_conversion_table): implement convert_inline_command. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm, tp/Texinfo/XS/convert/converter.c: move contents_inline_element up in source file. * tp/Texinfo/XS/convert/converter.c: move mini_toc_internal and convert_heading_command up in source file. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/converter.c (xml_comment): add. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_comment) (format_comment): implement format_comment. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_U_command) (commands_internal_conversion_table): implement convert_U_command. 2023-12-27 Gavin Smith <gavinsmith0123@gmail.com> * tp/t/test_utils.pl (convert_to_info): If not outputting to a file, set OUTPUT_PERL_ENCODING to an empty string to disable any character encoding. This is in order to minimise changes to the test results when Texinfo::Convert::Plaintext::convert starts returning an encoded string in the future. This changes some byte offsets in the test results to meaningless values. If these offsets needed to be tested, a separate Info output file would have to be used instead. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_special_body_about): rename $button as $direction. * tp/Texinfo/XS/convert/convert_html.c (translate_convert_to_html_internal): add a function to translate and convert. * tp/Texinfo/XS/convert/convert_html.c (default_format_special_body_about) (special_unit_body_internal_formatting_table): implement default_format_special_body_about. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (default_format_special_body_footnotes) (special_unit_body_internal_formatting_table): implement format_special_body_footnotes. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (default_format_special_body_shortcontents) (special_unit_body_internal_formatting_table): implement special_body_shortcontents. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (SPECIAL_UNIT_BODY_INTERNAL_CONVERSION) (default_format_special_body_contents, html_converter_initialize) (special_unit_body_internal_formatting_table): add the possibility to format special unit bodies. Implement special_body_contents. * tp/Texinfo/Convert/HTML.pm (_contents_inline_element), tp/Texinfo/XS/convert/convert_html.c (contents_inline_element): rename a variable. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_default_format_heading_text): handle the case of being in string. * tp/Texinfo/XS/convert/convert_html.c (convert_titlefont_command) (commands_internal_conversion_table): implement in C. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_accent_entities_html_accent): do not call xml_accent if accents are not formatted in the end as the only case where it should happen is @dotless with an unknown argument, and xml_accent will not handle it better, simply return the formatted accent argument. Same as in C. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_command_filename): set file number for regular output units only. * tp/Texinfo/XS/convert/convert_html.c (convert_footnote_command) (html_image_file_location_name), tp/Texinfo/XS/convert/converter.c (next_for_tieaccent): free variables (found with valgrind). 2023-12-30 Patrice Dumas <pertusus@free.fr> Fix memory leaks (found with valgrind) * tp/Texinfo/XS/convert/convert_html.c (convert_image_command): free image_path_info. * tp/Texinfo/XS/convert/convert_html.c (convert_math_command): properly free memory before exiting. * tp/Texinfo/XS/main/unicode.c (format_eight_bit_accents_stack): free encoded_u8, new_eight_bit and prev_eight_bit. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (direction_string) (html_internal_command_text, html_command_text) (convert_string_tree_new_formatting_context, file_header_information) (convert_def_line_type): do not use TREE_ADDED_ELEMENTS if the tree root element is destroyed in the same function. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_accent_entities_html_accent_internal): remove debugging message. * tp/Texinfo/XS/main/unicode.c (format_eight_bit_accents_stack): use %X in format instead of using %x and uppercasing. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/unicode.c (format_eight_bit_accents_stack): fix level instack at the end of the first phase of gathering codepoints. Do not double free new_eight_bit. * tp/Texinfo/XS/main/utils.c (word_bytes_len_multibyte): add a function that counts the bytes in contiguous word characters in a string, emulating \p{Word} or \w with unicode in perl. * tp/maintain/setup_converters_code_tables.pl (unicode_diacritics), tp/Texinfo/XS/main/unicode.h (DIACRITIC_UNICODE), tp/Texinfo/XS/main/unicode.c (unicode_accent): add the diacritic numeric representation in addition to the UTF-8 encoded string. * tp/Texinfo/XS/convert/converter.c (convert_accents), tp/Texinfo/XS/main/convert_to_text.c (ascii_accent), tp/Texinfo/XS/main/unicode.c (format_eight_bit_accents_stack) (format_unicode_accents_stack_internal): add convert accents. Use converter in accent formatting functions arguments passed to the accents stacks conversion functions. Update callers. * tp/Texinfo/XS/convert/converter.c (next_for_tieaccent) (UNICODE_ACCENT_LETTER, xml_numeric_entity_accent): implement xml_numeric_entity_accent. * tp/Texinfo/XS/convert/convert_html.c (html_accent_entities_html_accent_internal) (html_accent_entities_html_accent) (html_accent_entities_numeric_entities_accent) (convert_accent_command, html_converter_initialize) (html_free_converter, html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (ACCENT_ENTITY_INFO, CONVERTER): add a list of accent commands, converter->accent_formatted_cmd, collected while getting the formatting references. Get accent_entities information from perl to C. Implement convert_accent_command in C. 2023-12-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (convert_accents): reorganize code for more clarity. * tp/Texinfo/Convert/HTML.pm (_accent_entities_html_accent): do not consider an end of line in an accent command argument to allow to use the entity. * tp/Texinfo/Convert/Unicode.pm (%unicode_accented_letters): fix a codepoint. 2023-12-29 Patrice Dumas <pertusus@free.fr> Add gnulib module for XS * tp/Texinfo/XS: Run "gnulib-tool --add-import unictype/property-test" 2023-12-29 Patrice Dumas <pertusus@free.fr> Add gnulib modules for XS * tp/Texinfo/XS: Run "gnulib-tool --add-import unistr/u8-strmbtouc unictype/property-join-control unictype/property-alphabetic unictype/category-M unictype/category-Nd". 2023-12-29 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_math_command) (commands_internal_conversion_table): implement convert_math_command in C. 2023-12-28 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (url_protect_file_text): cast char to (unsigned char) before giving to text_printf with %x format, as the %x modifier expects an unsigned int parameter and a char will usually be promoted to an int when passed to a varargs function. * tp/Texinfo/XS/convert/convert_html.c (image_files_extensions) (find_image_extension_file, IMAGE_FILE_LOCATION_INFO) (free_image_file_location_info, html_image_file_location_name) (convert_image_command, commands_internal_conversion_table): implement convert_image_command in C. 2023-12-28 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (html_image_file_location_name) (_convert_image_command), tp/ext/epub3.pm (epub_convert_image_command): pass $image_basefile to html_image_file_location_name instead of returning it. * tp/Texinfo/Convert/HTML.pm (_convert_image_command): minor change for $alt_string setting. * tp/ext/epub3.pm (epub_convert_image_command): sync with _convert_image_command. 2023-12-28 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (url_protect_url_text): cast char to (unsigned char) before giving to text_printf with %x format, as the %x modifier expects an unsigned int parameter and a char will usually be promoted to an int when passed to a varargs function. * tp/Texinfo/XS/convert/convert_html.c (convert_uref_command) (commands_internal_conversion_table): implement convert_uref_command in C. 2023-12-28 Patrice Dumas <pertusus@free.fr> * * tp/Texinfo/XS/convert/convert_html.c (commands_internal_conversion_table): enable footnote commands conversion in C. 2023-12-28 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (find_element_target_number_linear, compare_element_target) (find_element_target_search, find_element_target) (find_element_special_target, sort_cmd_targets) (html_prepare_conversion_units_targets, reset_html_targets) (html_reset_converter, html_free_converter): sort target elements and use bsearch in find_element_target through find_element_target_search. Rename find_element_target_number as find_element_target_number_linear. * tp/Texinfo/XS/convert/convert_html.c (reset_html_targets) (html_reset_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add html_target_cmds, a list of cmd identifiers with associated targets to free only those when resetting parser. Free targets lists when resetting parser, not when freeing it. 2023-12-27 Gavin Smith <gavinsmith0123@gmail.com> * contrib/txipsfonts-gildea.diff, contrib/txipsfonts-bronger.tex: Remove these files (from 2002 and 2003). These files are not integrated into texinfo.tex and may no longer be useful. They were to use PostScript fonts. * contrib/README: Update. 2023-12-27 Gavin Smith <gavinsmith0123@gmail.com> * man/info.5, man/texinfo.5: Use https:// for Texinfo homepage URI. From Mike Frysinger. 2023-12-27 Gavin Smith <gavinsmith0123@gmail.com> * tp/texi2any.pl (makeinfo_help): Use https:// in URI. 2023-12-27 Gavin Smith <gavinsmith0123@gmail.com> * info/info.c (info_short_help), * install-info/install-info.c (print_help), * util/texi2dvi (usage), * Pod-Simple-Texinfo/pod2texi.pl (pod2texi_help), * doc/texinfo.texi (Reporting Bugs, Printed Books) (Testing for Texinfo Commands, Invoking pod2texi), * doc/texi2oldapi.texi (Texi2HTML history, Texi2HTML changes), * doc/refcard/txirefcard.tex, * doc/Makefile.am, * util/htmlxref.cnf: Use https:// instead of http:// for Texinfo homepage URI throughout. From Mike Frysinger <vapier@gentoo.org>. 2023-12-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (find_element_target) (find_element_special_target, add_element_target) (reset_html_targets_list, reset_html_targets) (html_reset_converter, html_free_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER): setup one list of targets per command id for regular targets (not for special targets). Update callers. 2023-12-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_get_target) (_set_heading_commands_targets, _prepare_conversion_units), tp/Texinfo/XS/convert/convert_html.c (html_get_target) (heading_commands_list, set_heading_commands_targets) (html_prepare_conversion_units_targets): prepare heading command targets in advance, not dynamically during the conversion. 2023-12-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm: document functions in converter for error and warning messages registration. * doc/texi2any_api.texi (Converter Object and Conversion Functions) (Error Reporting in User Defined Functions): replace Texinfo::Report functions by Texinfo::Converter::Convert uses for error reporting. 2023-12-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/main/build_perl_info.c (build_expanded_formats): rename get_expanded_formats as build_expanded_formats and move to build_perl_info.c. * tp/Texinfo/Convert/Converter.pm (converter): do not inherit Texinfo::Report. * tp/t/test_utils.pl (convert_to_*), tp/texi2any.pl: use separate registrar from converters to store and get the errors. * tp/Texinfo/XS/main/build_perl_info.c (pass_converter_errors): rename converter_hv as report_hv and verify that the errors_warnings key is set to clarify and make sure that the function is applied to a report object. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units): do not call pass_converter_errors, the converter is not a Texinfo::Report object anymore and all the messages are stored in the C converter. 2023-12-26 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/convert/get_html_perl_info.c (get_expanded_formats): Add missing dTHX. 2023-12-26 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_align_lines): Remove unused variable. 2023-12-26 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi: do not use Perl tree as it could also be a tree in C. Other misc changes. 2023-12-26 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi (Conversion Customization Variables): add get_conf return value. * doc/texi2any_api.texi (Shared Conversion State) (Define Get and Set Shared Conversion State) (Shared Conversion State in Defaut Formatting): document the new API. 2023-12-26 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi (Conversion General Information), tp/Texinfo/Convert/HTML.p (%available_converter_info) (_convert_heading_command), tp/init/book.pm: add expanded_formats to available_converter_info. * tp/Texinfo/Convert/HTML.pm (%default_shared_conversion_states), tp/Texinfo/XS/convert/convert_html.c (html_initialize_output_state) (html_reset_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_set_shared_conversion_state, html_get_shared_conversion_state) (get_expanded_formats), tp/Texinfo/XS/main/converter_types.h (HTML_SHARED_CONVERSION_STATE): remove expanded_format_raw shared conversion state. 2023-12-25 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c (find_element_from_sv): use output_units_descriptor only if set. * tp/Texinfo/XS/main/utils.c (expanded_formats_number): add. * tp/Texinfo/XS/main/utils.c (index_number_index_by_name): add. * tp/Texinfo/XS/convert/convert_html.c (prepare_index_entries_targets) (html_initialize_output_state, html_reset_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER, INDEX_NUMBER) (SORTED_INDEX_NAMES): sort index names and add a corresponding structure. * tp/Texinfo/XS/convert/convert_html.c (html_reset_converter), tp/Texinfo/XS/main/converter_types.h (HTML_SHARED_CONVERSION_STATE): add formatted_index_entries shared_conversion_state. * tp/Texinfo/XS/convert/convert_html.c (html_reset_converter), tp/Texinfo/XS/main/converter_types.h (HTML_SHARED_CONVERSION_STATE): add expanded_format_raw shared_conversion_state. * tp/Texinfo/XS/main/converter_types.h (HTML_TARGET): add formatted_nodedescription_nr for formatted_nodedescriptions shared_conversion_state. * tp/Texinfo/XS/convert/get_html_perl_info.c (find_index_entry_numbers_extra_index_entry_sv) (find_index_entry_extra_index_entry_sv): rename find_index_entry_element as find_element_extra_index_entry_sv, add find_index_entry_numbers_extra_index_entry_sv. * tp/Texinfo/Convert/HTML.pm (%default_shared_conversion_states) (define_shared_conversion_state, get_shared_conversion_state) (set_shared_conversion_state, register_footnote) (_convert_explained_command, _convert_footnote_command) (_convert_heading_command, _convert_menu_command) (_convert_printindex_command, _convert_menu_entry_type) (_initialize_XS_NonXS_output_state), tp/Texinfo/XS/convert/convert_html.c (html_register_footnote) (prepare_index_entries_targets, convert_heading_command), tp/init/book.pm b/tp/init/book.pm: change shared_conversion_state API, replace with define_shared_conversion_state, which sets the data specification, get_shared_conversion_state and set_shared_conversion_state. Add %default_shared_conversion_states for the share_conversion_state data description used in default HTML conversion code. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_XS_get_shared_conversion_state, get_shared_conversion_state) (_get_shared_conversion_state, _XS_set_shared_conversion_state) (get_shared_conversion_state, _initialize_output_state), tp/Texinfo/XS/convert/ConvertXS.xs (html_set_shared_conversion_state) (html_get_shared_conversion_state), tp/Texinfo/XS/convert/get_html_perl_info.c (find_index_entry_numbers_index_entry_sv) (find_node_target_info_nodedescription_sv) (html_set_shared_conversion_state, html_get_shared_conversion_state): XS override for get_shared_conversion_state and set_shared_conversion_state for the share_conversion_state data used in default HTML conversion code. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/call_html_perl_function.c, tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state) (html_free_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER): remove code for passing information to and from C and perl for previous shared_conversion_state. Remove get_shared_conversion_state, get_shared_conversion_state_integer and register_modified_shared_conversion_state_integer. * tp/Texinfo/XS/*/*.*: add some const, with some minor code modification when needed. 2023-12-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (%default_commands_args) (_convert_explained_command), tp/Texinfo/XS/convert/convert_html.c (default_commands_args, convert_explained_command): set 'normal' command arg for the second argument of explained commands and use it instead of calling convert_tree in convert_explained_command. 2023-12-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_def_line_type): call convert_tree and not _convert. 2023-12-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/build_html_perl_state.c: remove build_html_formatting_context_ctx, build_html_formatting_context, build_html_formatting_context_stack, build_html_composition_context_stack, build_html_preformatted_classes_stack and build_html_block_commands_stack, which are not used since the states are accessed through overrides and not passed to perl. 2023-12-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_command_root_element_command): rename command_root_element_command as html_command_root_element_command. * tp/Texinfo/Convert/HTML.pm (_internal_command_href, command_href), tp/Texinfo/XS/convert/convert_html.c (html_command_href) (html_internal_command_href): remove source_command argument, it is not used. * tp/Texinfo/Convert/HTML.pm (from_element_direction), tp/Texinfo/XS/convert/convert_html.c (from_element_direction): do not access targets state directly for the target, but through command_id for target type and command_text. * tp/Texinfo/XS/convert/ConvertXS.xs (html_command_id) tp/Texinfo/XS/convert/get_html_perl_info.c (element_converter_from_sv): add element_converter_from_sv to get both the converter and element in C based on perl input. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_tree_to_build), tp/Texinfo/XS/convert/call_html_perl_function.c: move build_tree_to_build to build_html_perl_state.c. * tp/Texinfo/XS/convert/convert_html.c (html_command_node), tp/Texinfo/XS/main/converter_types.h (HTML_TARGET): add. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_command_contents_target) (html_footnote_location_target, html_command_filename) (html_command_root_element_command, html_command_node) (html_internal_command_href, html_command_contents_href) (html_footnote_location_href, html_internal_command_tree) (html_internal_command_text): * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units), tp/Texinfo/Convert/HTML.pm (_initialize_XS_NonXS_output_state) (_initialize_output_state), tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_translated_names, build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_get_target) (html_reset_converter, html_check_transfer_state_finalization) (html_free_converter, html_translate_names), tp/Texinfo/XS/main/converter_types.h (CONVERTER): remove functions and code used to pass targets state information to perl, as now all the accesses are through overriden functions, such that perl targets state needs not to be set. Remove add_html_element_target, build_html_element_targets, pass_html_element_targets, build_html_special_targets, pass_html_special_targets. Remove also register_added_target_number and HTML_ADDED_TARGET_LIST. Also remove build_html_seen_ids and pass_html_seen_ids that are unused too. 2023-12-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_special_unit_variety_direction_index, html_get_target): rename special_unit_variety_direction_index as html_special_unit_variety_direction_index and get_target as html_get_target. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (find_element_target_number, find_element_target) (register_added_target_number, html_get_target), tp/Texinfo/XS/main/converter_types.h (HTML_ADDED_TARGET_LIST): pass added targets as the target number instead of the target info pointer, as the list may be reallocated in the mean time. * tp/Texinfo/Convert/HTML.pm (_external_node_href), tp/Texinfo/XS/convert/convert_html.c (external_node_href): remove unused source_filename argument. * tp/Texinfo/Convert/HTML.pm (from_element_direction), tp/Texinfo/XS/convert/convert_html.c (from_element_direction): call _external_node_href directly for external node. * tp/Texinfo/Convert/HTML.pm (_internal_command_href, command_href) (command_tree, _internal_command_tree, _external_command_tree) (_internal_command_text, command_text), tp/Texinfo/XS/convert/convert_html.c (html_command_href) (html_internal_command_href, html_command_tree) (html_internal_command_tree, html_external_command_tree) (html_internal_command_text, html_command_text): split *internal_command* out of html_command_tree, html_command_text and command_text, for clearer code and to prepare to override these functions only. * tp/Texinfo/XS/convert/get_html_perl_info.c (find_index_entry_element, find_root_command, find_element_from_sv): add find_element_from_sv to get the C tree element based on perl element, for elements with targets. * tp/Texinfo/XS/convert/ConvertXS.xs (html_get_target) (html_command_id), tp/Texinfo/XS/convert/get_html_perl_info.c (get_output_units_descriptor_converter_sv): prepare overriding _get_target and command_id. Not set up as an override for now as all the functions accessing targets need to be overriden at once. 2023-12-24 Gavin Smith <gavinsmith0123@gmail.com> * tp/t/languages.t (appendix_translated): Check translated appendix heading in Spanish rather than French, as the accented character in "Apéndice" is more problematic than the French "Annexe". 2023-12-24 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Translations.pm (replace_substrings) (replace_convert_substrings): Remove comment stating origin of a line of code, which is distracting and unnecessary. (It was "# next line taken from libintl perl, copyright Guido. sub __expand".) 2023-12-23 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Text.pm (text_heading, _text_heading): Rename with leading _ to indicate that this function is not called from outside the module any more. Fix spelling and grammar in a comment. 2023-12-23 Gavin Smith <gavinsmith0123@gmail.com> Headings in Plaintext.pm * tp/Texinfo/Convert/Plaintext.pm (_text_heading): Incorporate code from 'text_heading' in Texinfo/Convert/Text.pm and 'add_heading_number' in Texinfo/Convert/Utils.pm. Make $self the first argument. Take an element argument for the heading text rather than an already-converted string, and convert it with convert_line_new_context. Centralise code for getting the width of the heading text in screen columns. * tp/Texinfo/Translations.pm (gdt_string_columns): New function. This has no effect at present, but is in preparation for encoding the output throughout the conversion in Plaintext.pm in order to keep track of byte offsets in a simpler and more reliable way. 2023-12-23 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (html_register_footnote): use extra global_command_number to find footnote in C global commands data. 2023-12-23 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/build_perl_info.c (output_unit_to_perl_hash): add unit_index to output unit perl data. * tp/Texinfo/ParserNonXS.pm (_register_global_command), tp/Texinfo/XS/parsetexi/parser.c (register_global_command), tp/t/test_utils.pl (new_test): add global_command_number extra information. 2023-12-23 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/command_data.txt: set chapheading, heading, subheading, subsubheading and majorheading as global such that they could be retrieved more easily in C Texinfo tree. 2023-12-23 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Common.pm (_relate_index_entries_to_table_items_in), tp/Texinfo/XS/main/tree_types.h (INDEX_ENTRY_AND_INDEX), tp/Texinfo/XS/structuring_transfo/transformations.c (lookup_index_entry, relate_index_entries_to_table_items_in): add an extra associated_index_entry reference to the index entry information in the item reassociated to an index entry. 2023-12-23 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (compare_footnote_id) (find_footnote_id_number, prepare_footnotes_targets) (convert_footnote_command, html_reset_converter), tp/Texinfo/XS/main/converter_types.h (FOOTNOTE_ID_NUMBER, HTML_SHARED_CONVERSION_STATE): setup and free shared conversion state footnote_id_numbers and associated functions. Implement convert_footnote_command in C. Do not use, because the shared conversion states are not passed properly between C and perl. 2023-12-23 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_footnote_command): distinguish footnote id and docid and output footid and docid after disambiguation for footnote elements converted more than once. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_anchor_command): get id only if it will be used. * tp/Texinfo/XS/convert/convert_html.c (convert_anchor_command) (commands_internal_conversion_table): implement convert_anchor_command in C. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_explained_command): remove $with_explanation, use directly $explanation_result. * tp/Texinfo/XS/convert/convert_html.c (find_explained_command_string) (register_explained_command_string, convert_explained_command) (commands_internal_conversion_table, html_reset_converter) (html_free_converter), tp/Texinfo/XS/main/converter_types.h (EXPLAINED_COMMAND_TYPE, EXPLAINED_COMMAND_TYPE_LIST) (HTML_SHARED_CONVERSION_STATE): finalize type of explained commands strings. Implement convert_explained_command. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_email_command) (commands_internal_conversion_table): implement in C. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_explained_command): remove element_explanation_content now that it is not required as there is no possibility of infinite recursive expansions any more. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_explained_command): convert explanation string only once, where it appears initially and reuse the string instead of re-converting when an explanation is needed. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (direction_a): rename direction_anchor as direction_a. Update callers. * tp/Texinfo/XS/convert/convert_html.c (default_panel_button_dynamic_direction_internal): rearrange code and free href. * tp/Texinfo/XS/convert/convert_html.c (convert_xref_commands): allocate and free file, free href, destroy label_element and tree, removing leaks found by valgrind. * tp/Texinfo/XS/convert/convert_html.c (external_node_href): free parentheses_manual_name, removing leaks found by valgrind. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_value_command) (commands_internal_conversion_table): implement convert_value_command in C. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (%style_commands_formatting): do not put indicateurl in %style_commands_formatting and do not associate it, even temporarily, to _convert_style_command, as it has its own formatting function. 2023-12-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): increment converter->no_arg_formatted_cmd.number only if there was no error on the command and it is not undef. * tp/Texinfo/XS/convert/convert_html.c (html_free_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add style_formatted_cmd, the list of style formatted commands, set and free associated data fully. * tp/Texinfo/XS/convert/convert_html.c (convert_style_command) (convert_indicateurl_command, commands_internal_conversion_table) (html_converter_initialize): implement convert_style_command and convert_indicateurl_command. 2023-12-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_default_format_button_icon_img, format_button_icon_img): implement format_button_icon_img in C. 2023-12-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_format_button_function): use default_panel_button_dynamic_direction_section_footer and default_panel_button_dynamic_direction C functions for dynamic buttons formatting. 2023-12-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (external_node_href): call url_protect_file_text and not url_protect_url_text for files. * tp/Texinfo/XS/convert/convert_html.c (html_command_href) (html_command_contents_href): return 0 if there is no href, or the string is empty. Update callers. * tp/Texinfo/XS/convert/convert_html.c (html_command_href): set filename based on the first output unit if the filename is null, not only if the target_filename is null. * tp/Texinfo/XS/convert/convert_html.c (convert_xref_commands) (commands_internal_conversion_table): implement convert_xref_commands in C. * tp/Texinfo/XS/convert/converter.c (float_type_number): float_number extra information is a string. 2023-12-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands): remove file_arg_tree intermediary variable. * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands): if @*ref book argument is set, do not use the node name as section name. * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands): do not set $reference to $name for a clearer code. * tp/t/30sectioning.t (novalidate): move to @tests_info. 2023-12-21 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi, tp/Texinfo/Convert/HTML.pm (command_href) (command_contents_href, from_element_direction): return undef if there is no href, or the string is empty. Update callers. * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands): do not set variables to empty strings if not set, leave them undef. * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands): reorganize code to setup substrings once for all the possible commands. * tp/Texinfo/XS/main/debug.c (print_associate_info_debug): add some const. 2023-12-21 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <@item in @enumerate/@itemize>: Use Texinfo::Convert::Paragraph::counter rather than Texinfo::Convert::Unicode::string_width. 2023-12-21 Gavin Smith <gavinsmith0123@gmail.com> * tp/t/test_utils.pl (convert_to_plaintext): If not outputting to a file, set OUTPUT_PERL_ENCODING to an empty string to disable any character encoding. This currently has no effect on the test suite results, but is needed for when Texinfo::Convert::Plaintext::convert starts returning an encoded string in the future. 2023-12-20 Gavin Smith <gavinsmith0123@gmail.com> Paragraph formatter for @listoffloats output * tp/Texinfo/Convert/Plaintext.pm (_convert) <@listoffloats>: Use a single paragraph formatter to convert a whole entry in the list of floats. Use 'indent_length_next' setting for indenting subsequent lines, rather than adding spaces to the results string. Do not process the result of converting a caption twice. Do not process the converted caption with a regex splitting into words. Do not truncate caption at a fixed column or append "...". Eliminate use of Texinfo::Convert::Unicode::string_width on converted output. 2023-12-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.h: properly comment unused code. 2023-12-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_push_referred_command_stack_command, _pop_referred_command_stack) (_command_is_in_referred_command_stack, command_text) (_convert_xref_commands), tp/Texinfo/XS/convert/ConvertXS.xs (html_push_referred_command_stack_command) (html_pop_referred_command_stack) (html_command_is_in_referred_command_stack), tp/Texinfo/XS/convert/convert_html.c (html_command_text), tp/Texinfo/XS/main/command_stack.c (push_element_reference_stack_element) (pop_element_reference_stack, command_is_in_referred_command_stack), tp/Texinfo/XS/main/converter_types.h (ELEMENT_REFERENCE) (ELEMENT_REFERENCE_STACK, CONVERTER): add accessors around referred_command_stack state and override them to make sure that the state viewed from perl and C is the same, both from C to perl and perl to C. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state): remove the previous way to synchronize referred_command_stack from C to perl. * tp/Texinfo/Convert/HTML.pm (_initialize_output_state) (_initialize_XS_NonXS_output_state): move check_htmlxref_already_warned and referred_command_stack initialization to _initialize_output_state. 2023-12-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_panel_button_dynamic_direction): rearrange conditions to avoid redundant code. * tp/Texinfo/XS/main/converter_types.h (enum button_function_type) (BUTTON_FUNCTION, BUTTON_SPECIFICATION_INFO), tp/Texinfo/XS/main/get_perl_info.c (button_function_type_string) (html_get_button_specification_list): get the function reference name used to format buttons with directions. Based on the name, associate to an enum, one for each of the default button formatting functions. * tp/Texinfo/XS/main/converter_types.h (NODE_DIRECTIONS_OFFSET), tp/Texinfo/XS/main/tree_types.h (RUD_DIRECTIONS_TYPES_LIST): move NodeNext directions such that there is a fix offset between non prefixed Prev, Next, Up directions and Node prefixed corresponding directions. NodeBack is now the last relative direction. * tp/Texinfo/XS/convert/convert_html.c (direction_anchor) (default_panel_button_dynamic_direction_internal) (default_panel_button_dynamic_direction) (default_panel_button_dynamic_direction_node_footer) 'default_panel_button_dynamic_direction_section_footer): add omit_rel argument to direction_anchor, update callers. Implement default_panel_button_dynamic_direction*. * tp/Texinfo/XS/convert/convert_html.c (html_format_button_function) (button_direction_function, html_default_format_button): add html_format_button_function array and button_direction_function to call the C functions for the buttons formatting for default button formatting functions. 2023-12-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): to_convert key in translated direction strings can be undef if set through Config. 2023-12-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_command_href) (from_element_direction, mini_toc_internal): return 0 instead of an empty string. * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/main/utils.c (html_command_text_type_name): move html_command_text_type_name to utils.c and complete. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize) (html_free_converter), tp/Texinfo/XS/convert/convert_html.c (direction_string), tp/Texinfo/XS/main/api_to_perl.h (CONVERTER), tp/Texinfo/XS/main/get_perl_info.c (html_get_direction_index): setup self->direction_unit_direction_name with all the direction names. In direction_string, distinguish index in the full direction units array, to use self->direction_unit_direction_name and index in direction_string data. Use in html_get_direction_index. * tp/Texinfo/XS/main/converter_types.h (DIRECTION_ICON_LIST), tp/Texinfo/XS/main/get_perl_info.c (html_get_direction_icons_sv), tp/Texinfo/XS/main/utils.c (html_free_direction_icons), tp/Texinfo/options_data.txt, tp/maintain/regenerate_C_options_info.pl: use a specific type for icon direction associated file list, get them from perl. * tp/Texinfo/XS/main/api_to_perl.h (enum button_specification_type), tp/Texinfo/XS/main/get_perl_info.c (html_get_button_specification_list): use two different types of button_information_type, with selected and href direction_information_type, and determine the type index in html_get_button_specification_list. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_button_icon_img) (call_button_simple_function, call_button_direction_function), tp/Texinfo/XS/convert/convert_html.c (format_button_icon_img): add call_formatting_function_format_button_icon_img and functions called for button formatting. * tp/Texinfo/XS/main/api_to_perl.c (get_perl_scalar_reference_value): add a function to get a perl text reference value, used in buttons formatting. * tp/Texinfo/XS/convert/convert_html.c (direction_href_attributes) (direction_anchor, html_default_format_button, format_button): implement format_button in C. 2023-12-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (get_shared_conversion_state), tp/Texinfo/XS/main/converter_types.h (HTML_SHARED_CONVERSION_STATE), tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state, html_free_converter): add key_strings STRING_LIST field in HTML_SHARED_CONVERSION_STATE to allocate and save key strings, such that they can be freed in the end. * tp/Texinfo/XS/convert/converter.c (free_generic_converter): wipe error messages memory. * tp/Texinfo/XS/main/convert_to_text.c (brace_no_arg_command) (convert_to_text_internal), tp/Texinfo/XS/main/convert_utils.c (add_heading_number), tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element, convert_to_html_internal): destroy tree elements and free data to fix memory leaks detected by valgrind. 2023-12-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.c (add_string): return the newly duplicated string. * tp/Texinfo/XS/main/get_perl_info.c (get_line_message): replace strings in source_info by the strings saved in self->document->small_strings. 2023-12-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c: free memory/destroy elements to fix memory leaks shown by valgrind. 2023-12-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (call_file_id_setting_label_target_name): allow null label_element. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_css_lines), tp/Texinfo/XS/convert/convert_html.c (format_css_lines): add. * tp/Texinfo/XS/convert/convert_html.c (convert_string_tree_new_formatting_context) (html_prepare_converted_output_info): add to replace similar code used in diverse places. * tp/Texinfo/XS/convert/convert_html.c (html_default_entity_nbsp) (substitute_html_non_breaking_space, close_html_lone_element): implement substitute_html_non_breaking_space and close_html_lone_element in C. * tp/Texinfo/XS/main/converter_types.h (enum html_text_type) (direction_unit_direction), tp/Texinfo/XS/main/get_perl_info.c (html_get_direction_index): rename enum html_command_text_type as enum html_text_type, rename HCTT_* as HTT_* add possibilities of from_element_direction. Rename enum button_unit_direction as enum direction_unit_direction. Rename D_button_* as D_direction_*. Define FIRSTINFILE_MIN_IDX, FIRSTINFILE_MAX_IDX, FIRSTINFILE_OFFSET, FIRSTINFILE_NR, NON_SPECIAL_DIRECTIONS_NR. * tp/Texinfo/XS/convert/convert_html.c (from_element_direction): implement in C. * tp/Texinfo/XS/convert/convert_html.c (BEGIN_FILE_INFORMATION) (destroy_begin_file_information, root_html_element_attributes_string) (file_header_information, html_reset_converter, html_convert_output), tp/Texinfo/XS/main/converter_types.h (CONVERTER): implement file_header_information in C, set date_in_header in converter. * tp/Texinfo/XS/convert/convert_html.c (direction_string_type_names) (direction_string_context_names, clear_direction_string_type) (direction_type_translation_context, direction_string) (html_free_converter, html_translate_names), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (enum direction_string_context, enum direction_string_type) (HTML_DIRECTION_STRING_TRANSLATED, CONVERTER): get direction strings and translated direction s trings information from perl. implement direction_string in C. Rename enum direction_string as enum direction_string_type. * tp/Texinfo/XS/convert/convert_html.c (get_links): implement in C. * tp/Texinfo/XS/convert/convert_html.c (html_command_text): fix case of string type, by removing element in tree to build, using add_to_contents_as_array instead of add_to_element_contents and destroying elements. * tp/Texinfo/XS/convert/convert_html.c (html_command_text): return an empty string instead of 0. * tp/Texinfo/XS/convert/convert_html.c (normalized_label_id_file): label_element can be null. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_begin_file, format_begin_file): implement in C. * tp/Texinfo/Convert/HTML.pm (_check_htmlxref_already_warned) (_external_node_href), tp/Texinfo/XS/convert/ConvertXS.xs (html_check_htmlxref_already_warned), tp/Texinfo/XS/convert/convert_html.c (html_check_htmlxref_already_warned, external_node_href) (source_info_id, html_reset_converter, html_free_converter), tp/Texinfo/XS/main/converter_types.h (CONVERT): use a function for check_htmlxref_already_warned in perl, rename function to html_check_htmlxref_already_warned in C, add source_info_id, use source_info information to avoid duplicate messages for missing htmlxref.cnf entry in C. Make check_htmlxref_already_warned a STRING_LIST, remove HTMLXREF_MANUAL_ELEMENT_WARNED_LIST and HTMLXREF_MANUAL_ELEMENT_WARNED. * tp/Texinfo/XS/convert/convert_html.c (external_node_href): bugfix setting up paths of external hrefs. * tp/Texinfo/Convert/HTML.pm (_source_info_id): remove code without effect. 2023-12-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (from_element_direction): remove unreachable code. * tp/Texinfo/Convert/HTML.pm (direction_string): rename variable $context_string as $translation_context. * tp/Texinfo/Convert/HTML.pm (_convert_xref_commands): rename $root as $command, $command as $target_root and $node as $target_node. * tp/Texinfo/Convert/HTML.pm (_source_info_id, _external_node_href): use source_info information to avoid duplicate messages for missing htmlxref.cnf entry, not tree element. * tp/Texinfo/Convert/HTML.pm (_file_header_information): change order of code. Add intermediary variable $protected_jsdir. * tp/Texinfo/Convert/HTML.pm (_get_links): rename $element as $output_unit. * tp/Texinfo/options_data.txt (SECTION_NAME_IN_TITLE): SECTION_NAME_IN_TITLE is an int. 2023-12-17 Gavin Smith <gavinsmith0123@gmail.com> * README-hacking: tweak instructions for updating translations to stop po files changing again in a released distribution 2023-12-17 Gavin Smith <gavinsmith0123@gmail.com> Do not distribute xsubpp-generated files * tp/Texinfo/XS/Makefile.am (TestXS_la_SOURCES, MiscXS_la_SOURCES) (XSParagraph_la_SOURCES, Parsetexi_la_SOURCES, DocumentXS_la_SOURCES) (StructuringTransfoXS_la_SOURCES, ConvertXS_la_SOURCES): Do not distribute *.c files generated from *.xs files by xsubpp. List these files in the corresponding nodist_* variable. (CLEANFILES): Add these *.c files. (.xs.c): Generate in builddir not srcdir. This avoids the possibility of one of the distributed files being overwritten with no way to get back the original contents, while users expect "make distclean" to restore the original state of a distribution. Report from Hilmar Preuße <hille42@web.de>. 2023-12-17 Gavin Smith <gavinsmith0123@gmail.com> * configure.ac (AM_INIT_AUTOMAKE): Remove dist-xz for speed when testing. 2023-12-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_begin_file): do not set $command_for_title to an output unit, it should be a tree element. The associated element should be defined anyway. * tp/Texinfo/Convert/HTML.pm (output): keep file_info_label_element conflicting with redirection file, not the associated contents. 2023-12-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (_initialize_output_state, _initialize_XS_NonXS_output_state): add _initialize_XS_NonXS_output_state, which sets up the states that need to be set up both in perl and XS, and calls _initialize_output_state, now directly overriden, that sets up the states that only need to be setup if there is no XS. 2023-12-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (%XS_overrides, reset_converter), tp/Texinfo/XS/convert/ConvertXS.xs (reset_converter) (html_finalize_output_state), tp/texi2any.pl, tp/t/test_utils.pl (test): split reset_converter out of html_finalize_output_state, and call reset_converter later than html_finalize_output_state, when the converter data is not needed anymore. In html_finalize_output_state the finalization of the converting state is kept. * tp/Texinfo/Convert/HTML.pm (output): call count_elements_in_filename instead of accessing directly 'elements_in_file_count'. * tp/Texinfo/XS/convert/convert_html.c (find_page_name_number): return 0 if the file is not found. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_count_elements_in_filename), tp/Texinfo/XS/convert/convert_html.c (count_elements_in_filename_type) (html_count_elements_in_filename, count_elements_in_file_number), tp/Texinfo/XS/convert/convert_html.h (enum count_elements_in_filename_type): rename count_elements_in_filename as count_elements_in_file_number. Update callers. Add html_count_elements_in_filename. Add an XS interface for count_elements_in_filename. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_new_document_context, document_global_context) (html_set_pages_files, html_finalize_output_state), tp/Texinfo/XS/main/converter_types.h (FILE_NAME_PATH_COUNTER) (CONVERTER): remove document_global_context, and file_counters information passed to perl it is not needed with overrides. Remove corresponding structures in C, file_changed_counter in converter, and counter_changed in FILE_NAME_PATH_COUNTER. 2023-12-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_initialize_output_state) (converter_initialize): move document_context and multiple_pass initialization to _initialize_output_state. 2023-12-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_utils.c (add_heading_number): implement the case of translations, with a converter with translations support present. * tp/t/convert_to_text.t: test a call of Texinfo::Convert::Utils::add_heading_number from Texinfo::Convert::Text with a converter associated to the text options. This cannot happen otherwise, as either there is a converter with translations support associated but no conversion of sectioning commands, or the converter is the simple Text converter without support for translations. 2023-12-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_today_command) (commands_internal_conversion_table), tp/Texinfo/XS/main/convert_to_text.c (convert_to_text_internal), tp/Texinfo/XS/main/convert_utils.c (expand_today): implement expand_today. Use it in convert_to_text and in implementation of convert_today_command for HTML in C. 2023-12-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_text.c (copy_options_for_convert_text) (brace_no_arg_command, convert_to_text_internal), tp/Texinfo/XS/main/convert_to_text.h (TEXT_OPTIONS): add converter to text options, use it for untranslated text, translated commands without arguments, verbatiminclude errors. Use options for definition_category_tree. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_converted_output_info), tp/Texinfo/XS/main/get_perl_info.c (recopy_converter_conf_sv) (set_output_converter_sv): add recopy_converter_conf_sv to reset a converter value based on perl converter, use in html_prepare_converted_output_info and set_output_converter_sv. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides): use _prepare_converted_output_info override. 2023-12-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Document.pm (%XS_overrides, _XS_set_document_global_info) (set_document_global_info), tp/Texinfo/XS/main/DocumentXS.xs (set_document_global_info, rebuild_document), tp/Texinfo/XS/main/build_perl_info.c (build_global_info), tp/Texinfo/XS/main/document_types.h (GLOBAL_INFO), tp/Texinfo/XS/main/utils.c (delete_global_info), tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info), tp/t/test_utils.pl (test): setup an method in Texinfo::Document, set_document_global_info to set document global info. Add an XS interface and add the input_perl_encoding to the global info known in XS even though it is used in perl only. Remove from rebuild_document the code copying perl data from the input document to the rebuilt perl document, as it is now stored in C. 2023-12-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (set_conf, force_conf): no need to encode in perl, it is done in C. * tp/Texinfo/XS/main/get_perl_info.c (add_svav_to_string_list) (html_get_button_specification_list), tp/maintain/regenerate_C_options_info.pl: clear strings list before setting them. Handle undef value for all the types. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/build_html_perl_state.c (build_simpletitle): add missing dTHX. Report from Gavin. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/maintain/regenerate_C_options_info.pl: really output html_free_button_specification_list for options. Add missing include files for options_init_free.c. * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES, EXTRA_DIST) (libtexinfoxs_la_SOURCES), tp/Texinfo/XS/main/get_perl_info.c, tp/Texinfo/XS/main/get_perl_info.h, tp/Texinfo/XS/main/utils.c, tp/Texinfo/XS/main/utils.h: do not include options_init_free.c nor options_get_perl.c directly in code. Move .c files declaration form EXTRA_DIST to *la_SOURCES if they are not included in other file and move .h files declarations too. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c (get_source_info): do not check the length of macro and file_name anymore, as the key should not be there if they are not set. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/tree_types.h (enum tree_added_elements_status): rename tree_added_status_normal as tree_added_status_elements_added. * tp/Texinfo/XS/convert/convert_html.c (new_tree_added_elements): add status argument to have status set to something else than none. TREE_ADDED_ELEMENTS that are not allocated through new_tree_added_elements still need to have the status field set. Update callers. * tp/Texinfo/XS/convert/convert_html.c (convert_def_line_type) (convert_no_arg_command, convert_to_html_internal): free strings that need to (found with valgrind), and destroy parsed_def. * tp/Texinfo/XS/convert/convert_html.c (convert_def_line_type) (html_prepare_converted_output_info): remove tree root from tree_to_build after conversion before it is destroyed as a tree added element. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/debug.c (debug_protect_eol): add handling of NULL string. * tp/Texinfo/XS/main/translations.c (replace_convert_substrings): add OPTIONS argument, and use that argument and document error messages information for translations and debug messages, to avoid using internal parser data. Update callers. * tp/Texinfo/XS/main/debug.c, tp/Texinfo/XS/parsetexi/debug_parser.c: move all the functions that depend on debug_output internal parser value from debug.c to debug_parser.c, corresponding to set_debug_output, debug, debug_nonl, debug_print_element and debug_print_protected_string. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES), tp/Texinfo/XS/main/errors.c (vmessage_list_line_error), tp/Texinfo/XS/parsetexi/errors_parser.c, tp/Texinfo/XS/parsetexi/errors_parser.h: rename message_list_line_error_internal as vmessage_list_line_error. Update callers. Add errors_parser.c and move functions using parser internal structures, current_source_info, error_messages_list and debug_output from errors.c to errors_parser.c. This corresponds to line_error_internal, line_error_ext, line_error, line_warn, command_warn, command_error, forget_errors, bug_message_internal and bug_message. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/errors.c (message_list_line_error_internal) (line_error_internal, message_list_line_error_ext) (message_list_command_warn, vmessage_list_command_warn) (message_list_command_error): add an explicit warn argument to message_list_line_error_internal. Pass OPTIONS information to message_list_line_error_ext, message_list_command_warn, vmessage_list_command_warn and message_list_command_error. Update callers. 2023-12-12 Patrice Dumas <pertusus@free.fr> No empty file_name in source info * tp/Texinfo/ParserNonXS.pm (_input_push_text, _bug_message) (_next_text), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash, build_source_info_hash): do not set source info 'file_name' to an empty string if not parsing a file, always check if defined before using. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Report.pm (format_line_message): only check if macro is defined. 2023-12-12 Patrice Dumas <pertusus@free.fr> No empty macro in source info * tp/Texinfo/ParserNonXS.pm (_input_push_text, _input_push_file) (_bug_message, _next_text, _check_line_directive), tp/Texinfo/Report.pm (format_line_message), tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash) (build_source_info_hash): do not set source info 'macro' to an empty string if not in macro a context, leave out the key, and check that it is defined. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c (get_source_info): use SvPVbyte for file_name. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (converter_line_error) (converter_line_warn), tp/Texinfo/XS/convert/ConvertXS.xs (converter_line_error, converter_line_warn), tp/Texinfo/XS/main/get_perl_info.c (get_line_message): remove 'silent' argument. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Structuring.pm (setup_sortable_index_entries): fix function name. 2023-12-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Report.pm (format_line_message): add empty macro if there are lines numbers. This is not good, but is for consistency with what is done for Parser messages. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash): store empty string for macro and file_name only if line_nr is set. * tp/Texinfo/XS/main/get_perl_info.c (get_document_or_warn): document descriptor in converter can be undef. * tp/Texinfo/XS/main/build_perl_info.c (build_errors): rename get_errors as build_errors. Update callers. * tp/Texinfo/Report.pm (format_document_message, document_warn) (document_error, format_line_message, line_error, line_warn): make format_document_message and format_line_message independent of converter/Report object. Move the corresponding code back to document_warn, document_error, line_error, line_warn. * tp/Texinfo/XS/main/errors.c (message_list_line_error_internal) (message_list_line_formatted_message) (message_list_document_error_internal) (message_list_document_formatted_message): split message_list_line_formatted_message out of message_list_line_error_internal and message_list_document_formatted_message out of message_list_document_error_internal to be able to format/register an already translated message. * tp/Texinfo/Convert/Converter.pm (%XS_overrides) (_XS_converter_initialize, converter, _XS_html_converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (converter_initialize), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/get_perl_info.c (converter_initialize): separate generic converter initialization from HTML converter initialization and initialize generic converter in Converter.pm converter/get_perl_info.c converter_initialize. * tp/Texinfo/Convert/Converter.pm (converter_line_error, converter_line_warn, converter_document_error) (converter_document_warn, get_converter_errors), tp/Texinfo/Convert/Plaintext.pm (plaintext_line_warn) (plaintext_line_error), tp/Texinfo/Convert/Text.pm (converter_line_error, converter_document_warn), tp/Texinfo/Convert/Utils.pm (expand_verbatiminclude), tp/Texinfo/Structuring.pm (_converter_or_registrar_line_warn) (setup_sortable_index_entries): use specific error reporting for converters, which use Texinfo::Report for formatting, but register in converter. Use get_converter_errors to get errors to Texinfo::Register, both for XS and perl converters. Update all calls to Texinfo::Report to be converter_* calls. Rename converter_line_error and converter_line_warn in Plaintext.pm as plaintext_line_error and plaintext_line_warn as the method names are now the generic converter method names. Use only one argument for converter in expand_verbatiminclude. setup_sortable_index_entries error messages can be both called from converters or Texinfo::Report object separate from customization information, so use a specific function to call Texinfo::Report or converter functions. * tp/Texinfo/XS/convert/ConvertXS.xs (%XS_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (converter_line_error) (converter_line_warn, converter_document_error) (converter_document_warn), tp/Texinfo/XS/main/get_perl_info.c (get_source_info, get_line_message), tp/t/test_utils.pl (convert_to_plaintext, convert_to_info, convert_to_html) (convert_to_xml, convert_to_docbook, convert_to_latex): override converter_line_*, converter_document_* in XS. This is for all the converters. 2023-12-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (%XS_overrides), tp/Texinfo/Report.pm (format_line_message, line_warn, line_error) (format_document_message, document_warn, document_error): split formatting messages out of line_* and document_*, adding format_line_message for line messages and format_document_message for document messages, using only one function for both errors and warnings, as in XS. 2023-12-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/ParserNonXS.pm (_parse_texi): rename global information info key as global_info in document registering. 2023-12-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_prepare_converted_output_info) (output): new function to be able to override setting up titles, copying comment and documentdescription. * tp/Texinfo/XS/convert/ConvertXS.xs (html_translate_names): do not get conf, set_conf is already overriden. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_simpletitle), tp/Texinfo/XS/convert/build_html_perl_state.c (build_simpletitle): separate function to build simpletitle for perl. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_comment), tp/Texinfo/XS/convert/convert_html.c (format_comment): add. * tp/Texinfo/Document.pm (register, global_information), tp/Texinfo/ParserNonXS.pm (%parser_state_initialization) (get_parser_info, parse_texi_file, _handle_line_command) (_handle_block_command), tp/Texinfo/XS/main/DocumentXS.xs (rebuild_document), tp/Texinfo/XS/main/build_perl_info.c (get_document, build_document), tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_parser_info), tp/t/test_utils.pl (test): rename global information info key as global_info. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_converted_output_info), tp/Texinfo/XS/convert/convert_html.c (html_prepare_converted_output_info, html_finalize_output_state), tp/Texinfo/XS/main/converter_types.h (CONVERTER): implementation of _prepare_converted_output_info in C and XS interface. Not activated, as the output is not correct for now, because of incorrect synchronization with perl state. 2023-12-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/ParserNonXS.pm (_command_warn, _command_error): only use the command source info. Update callers. * tp/Texinfo/ParserNonXS.pm (_end_line_starting_block), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block): use multitable command for "unexpected argument on @%s line" warning. * tp/Texinfo/ParserNonXS.pm (_end_line_misc_line), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line): use _line_error for @columnfraction error, as @columnfraction does not have a command source info. * tp/Texinfo/ParserNonXS.pm (_handle_open_brace), tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): always put a source info in bracketed_arg type, as there are related errors. * tp/Texinfo/XS/main/errors.c (message_list_line_error_internal) (line_error, line_warn): do not use current_source_info in message_list_line_error_internal, set it in line_error and line_warn. * tp/Texinfo/XS/main/build_perl_info.c (build_source_info_hash): complete macro and file_name with empty string only if line_nr is set. * tp/Texinfo/XS/main/errors.c (message_list_line_error_ext): add. 2023-12-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_default_format_navigation_panel): free result_buttons. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_prepare_output_sv): allocate jslicenses.list only if not empty. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_program_string, format_program_string): implement format_program_string in C. 2023-12-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/options_data.txt (PROGRAM_NAME_IN_FOOTER): type is int. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_program_string), tp/Texinfo/XS/convert/convert_html.c (format_program_string): add. * tp/Texinfo/XS/convert/get_html_perl_info. (html_converter_initialize_sv, html_converter_prepare_output_sv): move getting jslicenses information to html_converter_prepare_output_sv. * tp/Texinfo/XS/convert/call_html_perl_function.c (html_default_format_end_file): implement in C. 2023-12-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (JSLICENSE_FILE_INFO, JSLICENSE_FILE_INFO_LIST) (JSLICENSE_CATEGORY_LIST, CONVERTER): get jslicenses information from perl. 2023-12-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_end_file): avoid using intermediary variables. * doc/texi2any_api.texi (Associating Information to an Output File), tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_register_file_information) (html_get_file_information), tp/Texinfo/XS/convert/convert_html.c (html_register_file_information, html_get_file_information) (html_set_pages_files, setup_output_simple_page) (html_finalize_output_state), tp/Texinfo/XS/main/converter_types.h (ASSOCIATED_INFO_LIST, CONVERTER): implement get_file_information and register_file_information and add an XS interface. 2023-12-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (format_simpletitle) (html_default_format_titlepage, format_titlepage): implement format_titlepage in C. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_title_titlepage): return the result. 2023-12-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_title_titlepage): avoid intermediary variables. * tp/Texinfo/Convert/HTML.pm (_prepare_simpletitle, convert, output): add _prepare_simpletitle. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_simpletitle), tp/Texinfo/XS/convert/convert_html.c (html_prepare_simpletitle), tp/Texinfo/XS/main/converter_types.h (CONVERTER): implement html_prepare_simpletitle and an XS interface. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_titlepage), tp/Texinfo/XS/convert/convert_html.c (contents_shortcontents_in_title) (format_titlepage, html_default_format_title_titlepage) (format_title_titlepage, html_prepare_title_titlepage): have format_title_titlepage return a char *. Add contents_shortcontents_in_title, call_formatting_function_format_titlepage and format_titlepage. Implement html_default_format_title_titlepage in C. 2023-12-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_default_format_footnotes_sequence): destroy pending footnotes in the end. * tp/Texinfo/Convert/HTML.pm (_default_format_contents): rename $contents variable as $is_contents and $toplevel_contents as $has_toplevel_contents. Avoid some intermediary variables. * tp/Texinfo/XS/convert/convert_html.c (command_root_element_command): return the command if it is already set. * tp/Texinfo/XS/convert/convert_html.c (html_command_contents_target): fix name of command. * tp/Texinfo/XS/convert/convert_html.c (html_command_contents_href): target_filename filename can be NULL. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_contents) (format_contents): implement html_default_format_contents in C. 2023-12-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (format_protect_text) (html_convert_css_string, html_initialize_output_state), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add current_format_protect_text function reference in converter to switch from html to css formatting in C in format_protect_text. 2023-12-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_*), tp/Texinfo/XS/convert/convert_html.c (format_translate_message) (format_contents, format_title_titlepage, format_element_footer) (format_end_file, format_begin_file): pass formatting_reference to all the call_formatting_function_format_* functions. Add wrappers for all those functions in convert_html.c. Update callers. 2023-12-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_css_string_convert_text) (css_string_convert_no_arg_command, SPECIAL_LIST_MARK_CSS_NO_ARGS_CMD) (html_convert_css_string_for_list_mark, html_converter_initialize): implement css strings formatting in C. * tp/Texinfo/XS/convert/convert_html.c (convert_itemize_command): implement in C. 2023-12-08 Gavin Smith <gavinsmith0123@gmail.com> Line length using counter for @listoffloats * tp/Texinfo/Convert/Plaintext.pm (_convert) <@listoffloats>: Eliminate call to convert_line, followed by call to Texinfo::Convert::Unicode::string_width. Instead, format the entry using a line formatter object, followed by a call to Texinfo::Convert::Paragraph::counter to get the line length. This is needed for future plans for this code, where convert_line will return an already-encoded string which can't be passed to string_width. 2023-12-08 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/Makefile.am (main/accent_tables_8bit_codepoints.c) (main/cmd_normalization.c): Make generated files depend on the scripts that generate them. I could not build the program because one of these files was stale. 2023-12-08 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert) <@listoffloats>: Eliminate default of ':' for "float entry text" as it does not appear to be used for valid input and would produce malformed Info output if used. Simply skip the entry if the "entry text" cannot be obtained. 2023-12-08 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_no_arg_command) (text_element_conversion, html_converter_initialize): implement convert_no_arg_command. 2023-12-08 Patrice Dumas <pertusus@free.fr> * tp/t/test_utils.pl (convert_to_html): get XS error messages by calling get_converter_errors. * tp/init/documentation_examples.pm (my_convert_paragraph_type): call get_associated_formatted_inline_content as it should be. 2023-12-08 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_noticed_line_warn): do not return a value. * tp/Texinfo/XS/convert/convert_html.c (noticed_line_warn), tp/Texinfo/XS/main/errors.c (vmessage_list_command_warn): add noticed_line_warn. Add a "v" version of message_list_command_warn that takes a va_list as argument instead of a variable length argument to be used in case the caller already has a variable length argument, as is the case with noticed_line_warn. * tp/Texinfo/XS/convert/convert_html.c (convert_raw_command): implement in C. 2023-12-08 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (get_associated_inline_content_number) (html_associate_pending_formatted_inline_content) (html_get_associated_formatted_inline_content) (html_finalize_output_state), tp/Texinfo/XS/main/converter_types.h (HTML_ASSOCIATED_INLINE_CONTENT): use a TEXT in HTML_ASSOCIATED_INLINE_CONTENT to accumulate content, and allow the same element to be found more than once when text appears. 2023-12-08 Patrice Dumas <pertusus@free.fr> * tp/ext/highlight_syntax.pm (highlight_open_inline_container_type): do not call get_pending_formatted_inline_content at example opening if the code calling get_associated_formatted_inline_content will not be called for example conversion, to have a correct pairing of calls by the preformatted element eventually formatted. 2023-12-08 Patrice Dumas <pertusus@free.fr> Pass XS converter errors to texi2any * tp/Texinfo/Convert/Converter.pm (%XS_overrides) (get_converter_errors), tp/Texinfo/Convert/Text.pm (get_converter_errors), tp/Texinfo/XS/convert/ConvertXS.xs (get_converter_errors), tp/texi2any.pl: add an XS interface to get converter error. Add them to the Texinfo::Report associated to the perl converter. 2023-12-08 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_def_line_type): avoid intermediate variables, move code around. * tp/Texinfo/XS/convert/convert_html.c (html_in_multi_expanded): add. * tp/Texinfo/XS/main/utils.c (def_aliases), tp/Texinfo/XS/main/utils.h (DEF_ALIAS), tp/Texinfo/XS/parsetexi/def.c (parse_def): move DEF_ALIAS to utils.h and def_aliases to utils.c from def.c. Add aliases of def*x commands. * tp/Texinfo/XS/convert/convert_html.c (convert_def_line_type) (types_internal_conversion_table): implement convert_def_line_type in C. * tp/Texinfo/XS/convert/convert_html.c (reset_translated_special_unit_info_tree): remove a destroyed element from tree to build. (convert_to_html_internal) <untranslated>: add tree to build. * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state): free tree_to_build.list after the corresponding messages have been issued. Show the tree_to_build elements remaining. The elements could have been destroyed, so only show if DEBUG is set. With DEBUG, this could produce a segfault, but using valgrind should give an idea where the tree_to_build element was created/destroyed. * tp/Texinfo/XS/convert/convert_html.c (html_free_converter): show the ignored error messages. 2023-12-08 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (call_types_open): call build_tree_to_build only if not exiting immediately. * tp/Texinfo/Convert/Converter.pm (import, %XS_overrides): use a hash for XS overrides. 2023-12-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (nav_panel_array) (nav_panel_classes, html_default_format_navigation_panel) (foot_body_heading_array, foot_body_heading_classes) (html_default_format_footnotes_sequence, mini_toc_array) (mini_toc_classes, mini_toc_internal): use static data for classes arrays that are not dynamic. 2023-12-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (footnote_location_href): rename $special_target as $footnote_location_target_info. * tp/Texinfo/Convert/HTML.pm (_default_format_heading_text): Avoid intermediary variables. * tp/Texinfo/Convert/HTML.pm (_get_copiable_anchor): Allow id to be 0. * tp/Texinfo/XS/convert/convert_html.c (copiable_link_array) (copiable_link_classes, get_copiable_anchor) (html_default_format_heading_text, format_heading_text): implement get_copiable_anchor and format_heading_text in C. Update callers of call_formatting_function_format_heading_text to call format_heading_text instead. 2023-12-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (footnote_location_target): explicit return undef. * tp/Texinfo/XS/convert/convert_html.c (get_footnote_location_target) (html_footnote_location_target, html_footnote_location_href) (html_default_format_footnotes_sequence, format_footnotes_sequence) (default_format_footnotes_segment): implement html_footnote_location_target, html_footnote_location_href and html_default_format_footnotes_sequence in C. 2023-12-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_default_format_separate_anchor, format_separate_anchor) (convert_heading_command): implement html_default_format_separate_anchor in C. 2023-12-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_default_format_navigation_panel): ignore leading space button also if the button specificatio is a reference on an array. * tp/Texinfo/XS/main/tree_types.h (HTML_GLOBAL_DIRECTIONS_LIST) (enum global_unit_direction), tp/Texinfo/XS/main/utils.h: move HTML_GLOBAL_DIRECTIONS_LIST to tree_types.h. * tp/Texinfo/XS/main/api_to_perl.c (unregister_perl_button), tp/Texinfo/XS/main/converter_types.h (enum button_unit_direction) (BUTTON_SPECIFICATION_INFO, BUTTON_SPECIFICATION), tp/Texinfo/XS/main/get_perl_info.c (get_sv_options, copy_sv_options) (converter_initialize, set_output_converter_sv) (html_get_direction_index, html_get_button_specification_list), tp/Texinfo/XS/main/utils.c (html_button_direction_names) (html_free_button_specification_list), tp/maintain/regenerate_C_options_info.pl: get perl buttons information into C with html_get_direction_index and html_get_button_specification_list, add html_free_button_specification_list to free that information. Add a converter argument to *_sv_options to obtain the special output units direction strings. Update callers. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_button), tp/Texinfo/XS/convert/convert_html.c (html_global_unit_direction_names, format_button) (html_default_format_navigation_panel, format_navigation_panel), tp/Texinfo/XS/main/converter_types.h (FORMATTED_BUTTON_INFO): add call_formatting_function_format_button, implement format_navigation_panel in C. * tp/Texinfo/XS/convert/call_html_perl_function.c: add const. 2023-12-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_default_format_navigation_header, format_navigation_header): implement html_default_format_navigation_header. 2023-12-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_navigation_panel), tp/Texinfo/XS/convert/convert_html.c (unit_is_top_output_unit) (format_navigation_panel, format_navigation_header) (html_default_format_element_header, format_element_header) (convert_heading_command): implement html_default_format_element_header, add corresponding format_element_header. Prepare format_navigation_panel and format_navigation_header, add call_formatting_function_format_navigation_panel. 2023-12-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_heading_command): destroy the menu that was automatically generated. * tp/Texinfo/XS/convert/convert_html.c (convert_heading_command) (convert_special_unit_type): free closed_strings list, classes, heading. * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state) (html_free_converter): reset and free added_targets. * tp/Texinfo/XS/structuring_transfo/structuring.c (print_down_menus): destroy the new menu created if there was none in the node. * tp/Texinfo/XS/structuring_transfo/structuring.c (new_complete_menu_master_menu): destroy temporary menus list. 2023-12-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_contents): command can be 0. * tp/Texinfo/XS/convert/convert_html.c (convert_heading_command): register menu tree to be built to perl. * tp/Texinfo/XS/structuring_transfo/structuring.c (print_down_menus): do not create menus when looking for them. * tp/Texinfo/XS/convert/convert_html.c (commands_internal_conversion_table): use convert_heading_command for all the heading commands. * tp/Texinfo/Convert/HTML.pm (_contents_inline_element), tp/Texinfo/XS/convert/convert_html.c (contents_inline_element): rename $command argument as $element and other $command as $unit_command. Rearrange code. 2023-12-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_register_id, _id_is_registered) (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_register_id, html_id_is_registered): access 'seen_ids' through functions, _register_id and _id_is_registered. Add overrides for those functions. 2023-12-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_unique_target) (_new_sectioning_command_target, _prepare_index_entries_targets): use a _unique_target function as in C. 2023-12-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_new_sectioning_command_target): align contents and shhortcontents targets code on C code. * tp/Texinfo/Convert/HTML.pm (_new_sectioning_command_target), tp/Texinfo/XS/convert/convert_html.c (new_sectioning_command_target): if @top is empty, set the normalized to be the target base for contents_target and shortcontents_target. put contents_target and shortcontents_target in seen_ids. 2023-12-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/converter_types.h (FILE_NUMBER_NAME): rename CURRENT_FILE_INFO as FILE_NUMBER_NAME. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_command_text, html_free_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER): make referred_command_stack a stack instead of a list. * tp/Texinfo/XS/main/get_perl_info.c (converter_initialize): add and use FETCH macro. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_free_converter, get_shared_conversion_state_integer) (register_modified_shared_conversion_state_integer), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add functions to pass shared_conversion_state modified integers to perl. * tp/Texinfo/XS/convert/convert_html.c (format_protect_text) (url_protect_url_text, url_protect_file_text), tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_protect_text): add. * tp/Texinfo/XS/convert/convert_html.c (html_command_id): add some const. Rename target as target_info. * tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element) (new_sectioning_command_target, get_target): use element_builtin_data_cmd and variables for the flags to get the expected result even with user-defined @-commands. * tp/Texinfo/XS/main/get_perl_info.c (converter_initialize), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add output_format and pass from perl. * tp/Texinfo/XS/convert/convert_html.c (external_node_href) (htmlxref_split_type_names, htmlxref_entries) (compare_htmlxref_manual, find_htmlxref_manual) (check_htmlxref_already_warned, html_initialize_output_state) (html_free_converter), tp/Texinfo/XS/convert/call_html_perl_function.c (call_file_id_setting_external_target_split_name) (call_file_id_setting_external_target_non_split_name), tp/Texinfo/XS/main/converter_types.h (enum htmlxref_split_type) (HTMLXREF_MANUAL, HTMLXREF_MANUAL_LIST) (HTMLXREF_MANUAL_ELEMENT_WARNED, HTMLXREF_MANUAL_ELEMENT_WARNED_LIST) (CONVERTER): get htmlxref from perl, add related functions, set self->document_htmlxref_split_type, sort htmlxref information, add functions to get and warn if htmlxref not found. Implement external_node_href. * tp/Texinfo/XS/convert/call_html_perl_function.c: use SvPVutf8 more. * tp/Texinfo/XS/convert/convert_html.c (html_command_filename) (command_root_element_command, html_command_href) (html_command_contents_target, html_command_contents_href) (mini_toc_internal, contents_inline_element, convert_contents_command) (convert_heading_command), tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_contents) (call_formatting_function_format_separate_anchor) (call_formatting_function_format_element_header) tp/Texinfo/XS/convert/call_html_perl_function.h (TARGET_DIRECTORY_FILENAME),: implement html_command_filename, command_root_element_command, html_command_href, html_command_contents_target, html_command_contents_href, mini_toc_internal contents_inline_element . Add conversion functions convert_contents_command and convert_heading_command. Add perl functions call. 2023-12-04 Patrice Dumas <pertusus@free.fr> * tp/maintain/setup_converters_code_tables.pl: add include command_ids.h in generated cmd_structuring.c. * tp/Texinfo/XS/main/errors.c, tp/Texinfo/XS/main/debug.c, tp/Texinfo/XS/main/extra.c, tp/Texinfo/XS/main/tree_types.h, tp/Texinfo/XS/main/utils.c, tp/Texinfo/XS/main/manipulate_tree.c, tp/Texinfo/XS/main/build_perl_info.c: add some const. * tp/Texinfo/XS/main/unicode.c (compare_strings): make static. * tp/Texinfo/XS/main/utils.c (section_level_adjusted_command_name): implement. * tp/Texinfo/XS/main/convert_utils.c (find_root_command_next_heading_command): implement. * tp/Texinfo/XS/main/utils.c (is_content_empty), tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning), tp/Texinfo/XS/main/convert_to_texinfo.c (root_heading_command_to_texinfo), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents), tp/Texinfo/XS/main/output_unit.c (split_by_node, split_by_section): use element_builtin_data_cmd and variables for the flags to get the expected result even with user-defined @-commands. * tp/Texinfo/XS/main/command_stack.c (push_stack_element) (pop_stack_element), tp/Texinfo/XS/main/utils.c: move push_stack_element and pop_stack_element to command_stack.c. * tp/Texinfo/XS/structuring_transfo/structuring.c (compare_strings): make static. * tp/Texinfo/XS/structuring_transfo/structuring.c (protect_colon) (protect_colon_in_tree, new_complete_menu_master_menu), tp/Texinfo/XS/main/manipulate_tree.c (modify_tree) (new_asis_command_with_text, protect_text), tp/Texinfo/XS/structuring_transfo/transformations.c, tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES) (StructuringTransfoXS_la_SOURCES, ConvertXS_la_CPPFLAGS): move functions from transformations.c to structuring.c and manipulate_tree.c to avoid a dependency of structuring.c to transformations.c. Move structuring.c to libtexinfo.la such that converters can use functions in structuring.c. * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES, EXTRA_DIST), tp/Texinfo/XS/main/utils.c: move cmd_structuring.c out of utils.c. 2023-12-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (command_tree): copy tree in substituted strings in argument of gdt to obtain the same output as with XS code. * tp/Texinfo/Convert/HTML.pm (_convert_heading_command): fix code setting expanded_format_raw sared state. * tp/Texinfo/Convert/HTML.pm (_convert_heading_command): rearrange code, defining @heading_classes only where it is used. * tp/Texinfo/Convert/HTML.pm (_external_node_href): tighten the regexp used to remove inf or info extension. Rename $href as $htmlxref_href. Move code. * tp/Texinfo/Convert/HTML.pm (_mini_toc): remove useless code. * tp/t/html_tests.t ($check_htmlxref_text): add test of .inf as manual name extension. 2023-12-02 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (node_line): Rename to 'node_name' as node_line is a confusing name, the result not being a full line but usually only part of a line. 2023-12-02 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (preformatted_classes_stack), doc/texi2any_api.texi (Conversion in Preformatted Context): return a reference on an array instead of an array. Update callers. * tp/Texinfo/Convert/HTML.pm (_reset_unset_no_arg_commands_formatting_context): use _open_command_update_context to set the context of a preformatted command. * tp/Texinfo/Convert/HTML.pm (_set_code_context, _pop_code_context) (_set_string_context, _unset_string_context, _set_raw_context) (_unset_raw_context, _convert): add functions to encapsulate modification of document context to be able to override them with XS. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_new_document_context) (html_pop_document_context, html_open_command_update_context) (html_convert_command_update_context, html_open_type_update_context) (html_convert_type_update_context, html_set_code_context) (html_pop_code_context, html_set_string_context) (html_unset_string_context, html_set_raw_context) (html_unset_raw_context, html_debug_print_html_contexts) (html_in*, html_paragraph_number, html_preformatted_number) (html_top_block_command, html_preformatted_classes_stack), tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_in*, html_paragraph_number html_preformatted_number) (html_top_block_command, html_preformatted_classes_stack) (html_in_align, html_set_code_context, html_pop_code_context) (html_set_string_context) (html_unset_string_context) (html_set_raw_context, html_unset_raw_context) (html_new_document_context, html_check_transfer_state_finalization) (html_open_command_update_context, html_open_type_update_context) (html_convert_command_update_context) (html_convert_type_update_context, convert_to_html_internal), tp/Texinfo/XS/main/converter_types.h (CONVERTER): override all the functions setting or accessing document context instead of keeping track of modifications to pass information to perl. Remove code and data related to the previous design, in particular remove build_html_document_context_ctx and build_html_document_context 2023-12-01 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm: use non object oriented call when not useful and possibly harmful as we do not want replacement of those calls. For in_preformatted_context, in_math, in_upper_case, in_multi_expanded, top_block_command, inside_preformatted. 2023-12-01 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_text): revert inlining of calls to get state information for speed, to be able to override the function calls in XS. * tp/Texinfo/Convert/HTML.pm: use non object oriented call for in_string and _debug_print_html_contexts. 2023-12-01 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (default_commands_args): reorder to have an arg formatting done in the same order in perl and C. * tp/Texinfo/XS/convert/convert_html.c (default_commands_args): use F_AFT_none as flag for commands that do not have flag set but should not have their argument considered as normal. * tp/Texinfo/Convert/HTML.pm (_debug_print_html_contexts, _convert), tp/Texinfo/XS/convert/convert_html.c (debug_print_html_contexts) (convert_to_html_internal): separate the code showing the contexts to be able to use it for debugging. * tp/Texinfo/XS/convert/convert_html.c (convert_w_command) (commands_internal_conversion_table): implement and use convert_w_command. * tp/Texinfo/XS/convert/convert_html.c (open_quotation_command) (commands_internal_open_table): implement and use open_quotation_command. * tp/Texinfo/XS/convert/convert_html.c (open_inline_container_type): implement. 2023-12-01 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (COMMAND_INTERNAL_CONVERSION) (COMMAND_INTERNAL_OPEN, TYPE_INTERNAL_OPEN, types_internal_open_table) (commands_internal_conversion_table, commands_internal_open_table) (command_open_external, type_open_external) (register_type_open_function, register_command_open_function) (html_converter_initialize, convert_to_html_internal), tp/Texinfo/XS/main/converter_types.h (TYPE_OPEN_FUNCTION) (COMMAND_OPEN_FUNCTION, CONVERTER): add type_open_function and command_open_function to converter structure and functions to register command_open_external (renamed from command_open) and type_open_external (renamed from type_open). Use the function references in conversion. Add commands_internal_conversion_table, commands_internal_open_table and types_internal_open_table to list functions in C replacing perl functions if the default perl function is used. 2023-11-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (default_format_footnotes_segment): free foot_lines. * tp/Texinfo/XS/convert/convert_html.c (convert_unit_type) (convert_special_unit_type): free closed strings strings. * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state) (html_free_converter): clear pending_inline_content, associated_inline_content and shared_conversion_state.integers in html_finalize_output_state and free the stack/lists/associated_info in html_free_converter. 2023-11-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (associate_pending_formatted_inline_content): remove useless code. * tp/Texinfo/Convert/HTML.pm (register_pending_formatted_inline_content): do not register undef inline_content. * tp/Texinfo/Convert/HTML.pm (cancel_pending_formatted_inline_content): fix prototype, simpler code without intermediary array. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_register_pending_formatted_inline_content) (html_cancel_pending_formatted_inline_content) (html_get_pending_formatted_inline_content) (html_associate_pending_formatted_inline_content) (html_get_associated_formatted_inline_content), tp/Texinfo/XS/convert/convert_html.c (html_register_pending_formatted_inline_content) (html_cancel_pending_formatted_inline_content) (html_get_pending_formatted_inline_content) (html_associate_pending_formatted_inline_content) (html_get_associated_formatted_inline_content), tp/Texinfo/XS/main/converter_types.h (HTML_INLINE_CONTENT) (HTML_INLINE_CONTENT_STACK, HTML_ASSOCIATED_INLINE_CONTENT) (HTML_ASSOCIATED_INLINE_CONTENT_LIST, CONVERTER): implement register_pending_formatted_inline_content, cancel_pending_formatted_inline_content and get_pending_formatted_inline_content in C and XS interface. Implement associate_pending_formatted_inline_content and get_associated_formatted_inline_content in C and XS interface. 2023-11-30 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (format_contents): Use convert_line_new_context instead of convert_line. 2023-11-29 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (convert_line_new_context): New function, like convert_line but with a new context pushed onto $self->{'count_context'}. (_convert): Use convert_line_new_context wherever we previously surrounded a call to convert_line with pushing and popping a new context. 2023-11-29 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_convert_unfilled): Inline into the only call site, and remove function. 2023-11-28 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi (Customizing Footnotes), tp/Texinfo/Convert/HTML.pm (get_pending_footnotes) (_default_format_footnotes_sequence): have get_pending_footnotes return a reference on an array. * doc/texi2any_api.texi (Customizing Footnotes), tp/Texinfo/Convert/HTML.pm (_convert_footnote_command) (_default_format_footnotes_sequence, _convert_footnote_command): always pass the number of the footnote to register_footnote. * tp/Texinfo/Convert/HTML.pm (shared_conversion_state) (_initialize_output_state), tp/Texinfo/XS/convert/call_html_perl_function.c (get_shared_conversion_state, call_*), tp/Texinfo/XS/main/converter_types.h (HTML_SHARED_CONVERSION_STATE) (CONVERTER), tp/Texinfo/XS/main/extra.c (add_associated_info_integer): register in $self->{'shared_conversion_state_integers'} the conversion states that are integers. Register in $self->{'shared_conversion_accessed_integers'} the integer conversion states that were accessed such that XS code can get their values. Get the accessed integers at the end of call_* function by calling get_shared_conversion_state that add the integer to the C converter shared_conversion_state. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_register_footnote) (html_get_pending_footnotes), tp/Texinfo/XS/convert/build_html_perl_state.c (build_pending_footnotes), tp/Texinfo/XS/convert/convert_html.c (html_register_footnote, html_get_pending_footnotes) (destroy_pending_footnotes), tp/Texinfo/XS/main/converter_types.h (HTML_PENDING_FOOTNOTE, HTML_PENDING_FOOTNOTE_STACK, CONVERTER): implement register_footnote and get_pending_footnotes in C, add XS interface. * tp/Texinfo/Convert/HTML.pm (_convert_explained_command): rename element_explanation_contents shared_conversion_state as element_explanation_content. Avoid using contents separate from the associated element. 2023-11-28 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/ParserNonXS.pm (%parser_state_configuration): Add default value for 'restricted'. 2023-11-28 Gavin Smith <gavinsmith0123@gmail.com> restricted flag for XS parser * tp/Texinfo/XS/parsetexi/end_line.c (parse_line_command_args) <@alias, @definfoenclose, @defindex, @defcodeindex>, * tp/Texinfo/XS/parsetexi/indices.c (enter_index_entry): Do nothing if global_restricted is set. 2023-11-28 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/parsetexi/api.c (reset_parser): Reset global_restricted. 2023-11-27 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/parsetexi/parser.c (set_restricted, global_restricted): New. * tp/Texinfo/XS/parsetexi/macro.c (new_macro): Do nothing if global_restricted is set. * tp/Texinfo/XS/parsetexi/Parsetexi.xs, * tp/Texinfo/XS/parsetexi/api.c (parser_set_restricted): New function. Call set_restricted. * tp/Texinfo/Common.pm (%parser_options): Add 'restricted'. * tp/Texinfo/XS/parsetexi/Parsetexi.pm (simple_parser): Set 'restricted' flag. (parser): If 'restricted' flag is set, call parser_set_restricted. * tp/t/init_files_tests.t (macro_defined_txiinternalvalue_in_translation): Re-add test, to check what is done with this input and init file. From Patrice. 2023-11-27 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/ParserNonXS.pm (_new_macro), (_parse_line_command_args) <@alias, @definfoenclose> <@defindex, @defcodeindex>: Do nothing if 'restricted' flag set. * tp/t/init_files_tests.t (macro_defined_txiinternalvalue_in_translation): Remove test, as @macro no longer works inside a translated string. 2023-11-27 Gavin Smith <gavinsmith0123@gmail.com> Parser 'restricted' flag * tp/Texinfo/ParserNonXS.pm (simple_parser): Add 'restricted' flag on parser. (_enter_index_entry): Do nothing if flag is set. This prevents index information leaking among simple_parser objects. (simple_parser): Re-use indices information. * tp/t/init/translation_in_parser_in_translation.pm: Do not access index information from translation parser, as it isn't there. 2023-11-27 Gavin Smith <gavinsmith0123@gmail.com> Re-add simple_parser * tp/Texinfo/ParserNonXS.pm, tp/Texinfo/XS/parsetexi/Parsetexi.pm (parser, simple_parser): Re-add simple_parser, used for document translations. The only difference from before is that we do not share the indices between parsers. * tp/Texinfo/Translations.pm (replace_convert_substrings): Call simple_parser again. This reverses the change on 2023-08-10. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): fix comparison of default reference formatting and customized reference formating to use SvRV. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_footnotes_sequence), tp/Texinfo/XS/convert/convert_html.c (default_format_footnotes_segment, format_footnotes_segment) (convert_unit_type, html_convert_convert, html_convert_output): add call_formatting_function_format_footnotes_sequence, implement default_format_footnotes_segment in C. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_unit_type) (output_units_internal_conversion_table): implement convert_unit_type. * tp/Texinfo/Convert/HTML.pm (_convert_unit_type): only use $output_unit as variable name. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Transformations.pm (fill_gaps_in_sectioning), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (fill_gaps_in_sectioning), tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning): new optional Texinfo tree argument for fill_gaps_in_sectioning to use for all the added commands headings instead of an empty @asis. * Pod-Simple-Texinfo/pod2texi.pl, Pod-Simple-Texinfo/manual_tests/reference_Th1.texi, Pod-Simple-Texinfo/manual_tests/reference_sectioning_gap.texi: setup a Texinfo tree with the manual name to use as fill_gaps_in_sectioning argument if the sectioning base level is > 0. * Pod-Simple-Texinfo/manual_tests/manual_sectioning_gap_test.sh, manual_tests/Module1.pod, manual_tests/Module2.pod, manual_tests/reference_includes/ manual_tests/reference_modules_main.texi: new manual test with two modules. 2023-11-26 Gavin Smith <gavinsmith0123@gmail.com> No 'first_indent_length' option for new_formatter * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Eliminate 'first_indent_length' as a possible configuration option. This is not used by the paragraph formatting module itself, and was only used at place new_formatter was called. This means the options passed to new_formatter are now the same as those used for the paragraph formatter. (_convert) <paragraph indent>: Set 'indent_length' and 'indent_length_next' here, rather than 'first_indent_length'. 2023-11-26 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Propagate two formatter options directly rather than in a loop. 2023-11-26 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Do not set 'indent_level' on config structure passed to paragraph formatter, as it is not used. (_convert): Do not call new_formatter with 'indent_level' in the conf, setting 'indent_length' instead. 2023-11-26 Gavin Smith <gavinsmith0123@gmail.com> new_formatter tweaks * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Save value of a configuration variable to reuse it. Reorder conditional to check for 'paragraph' formatter first as this is the most frequently used. 2023-11-26 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Do no save the "type" of the formatter (line/paragraph/unfilled). (_convert) <@image>: Reset 'empty_lines_count' regardless of formatter type. <"format raw commands">: Always flush the output of the current formatter, not just for "paragraph" formatters. Do not output an extra end of line afterwards. 2023-11-26 Patrice Dumas <pertusus@free.fr> * Pod-Simple-Texinfo/pod2texi.pl (_parsed_manual_tree): modify code to avoid using separately contents and elements clarify what is actually done. Update information in FIXME comment. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/ParagraphNonXS.pm: remove a FIXME comment fixed. * tp/TODO: update. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Makefile.am b/tp/Makefile.am (dist_init_DATA): add init/sc_formatting_with_css.pm. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XSLoader.pm (init): call $module->import when falling back on pure perl module, not Texinfo::Parser->import. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/DocumentXS.xs (gdt): update build_texinfo_tree call. * tp/Makefile.am (dist_modules_DATA), tp/Texinfo/StructTransfXS.pm, tp/Texinfo/XS/Makefile.am (StructuringTransfoXS*), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs: rename StructTransf to StructTransfXS and StructuringTransfo to StructuringTransfoXS. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/DocumentXS.xs (gdt): move from TranslationsXS to DocumentXS. Remove TranslationsXS.pm and TranslationsXS.xs. * tp/Texinfo/XSLoader.pm (init): update message. 2023-11-26 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.c (section_level), tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block) (end_line_misc_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command), tp/Texinfo/XS/parsetexi/separator.c (handle_comma): use lookup_extra_* functions with a specific type and dynaic type checking, when possible. * tp/Texinfo/XS/parsetexi/macro.c: reindent. * tp/Texinfo/XS/parsetexi/separator.c (handle_open_brace): use a variable name for clearer code. 2023-11-25 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (lookup_extra_integer), tp/Texinfo/XS/main/manipulate_tree.c (increase_ref_counter) (get_copy_ref), tp/Texinfo/XS/main/tree_types.h (KEY_PAIR), tp/Texinfo/XS/main/utils.c (section_level), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_other_command) (handle_line_command): use int for the integer field in KEY_PAIR values union. Update declarations and remove casts. 2023-11-25 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/tree.c (remove_from_element_list): do not accept a where index equal to list->number. Do not call memmove if it is not needed. * tp/Texinfo/XS/convert/convert_html.c (count_elements_in_filename): fix result with CEFT_current. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): use simplified_special_unit_info instead of special_unit_info to get all the information. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_free_converter), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add referred_command_stack, add code to free and pass to perl. * tp/Texinfo/XS/convert/convert_html.c (new_tree_added_elements) (clear_tree_added_elements, free_tree_added_elements) (destroy_tree_added_elements, new_element_added), tp/Texinfo/XS/main/tree_types.h (enum tree_added_elements_status) (TREE_ADDED_ELEMENTS): add functions and structure to handle trees with added elements and Texinfo tree elements, or new tree obtained from gdt, in order to manage memory correctly, and unregister elements that were scheduled to be built for perl but are destroyed. * tp/Texinfo/XS/convert/call_html_perl_function.c (build_tree_to_build, call_*), tp/Texinfo/XS/convert/convert_html.c (special_unit_info_tree, html_finalize_output_state) (html_check_transfer_state_finalization) (reset_unset_no_arg_commands_formatting_context), tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/main/tree.c (add_element_if_not_in_list): change tree_to_build to be a list. Add and remove from the list, and add build_tree_to_build to build all the elements to perl in call_* functions. * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash) (build_perl_array, build_perl_container, build_perl_directions) (store_additional_info, build_texinfo_tree): add an argument, avoid_recursion, to recurse into children or out of tree elements only if hv is not already set. Update callers. * tp/Texinfo/XS/convert/converter.c (float_type_number): add. * tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_heading_text) (call_formatting_function_format_element_footer): add. * tp/Texinfo/XS/convert/convert_html.c (html_command_tree) (html_command_text, reset_html_targets, html_translate_names) tp/Texinfo/XS/main/converter_types.h (enum html_command_text_type) (HTML_TARGET): add. Update HTML_TARGET. Set and free html_target tree, tree_nonumber and command_text. * tp/Texinfo/XS/convert/convert_html.c (convert_special_unit_type) (output_units_internal_conversion_table): finish implementation of convert_special_unit_type. * tp/Texinfo/XS/main/translations.c (replace_substrings) (add_element_to_named_string_element_list) (add_string_to_named_string_element_list), tp/Texinfo/XS/main/translations.h (NAMED_STRING_ELEMENT): add some const. * tp/Texinfo/XS/main/output_unit.c (output_unit_texi), tp/Texinfo/Structuring.pm (output_unit_texi): better debug message. 2023-11-25 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (count_elements_in_filename) (_convert_special_unit_type): do not pass an undefined file name to count_elements_in_filename. * tp/Texinfo/Convert/Converter.pm (float_type_number): simplify code. * tp/Texinfo/Convert/HTML.pm (command_tree): remove code never run. Simplify code. * tp/Texinfo/Convert/HTML.pm (command_text): reorganize code. Handle string_nonumber similarly to text_nonumber. Introduce more intermediate variables, change variables names. 2023-11-25 Patrice Dumas <pertusus@free.fr> * tp/Makefile.tres, tp/t/03coverage_braces.t (two_footnotes_in_nodes_separate_no_header): add test with special output unit, HEADERS == 0 and conversion through convert. 2023-11-25 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Convert/Plaintext.pm (_process_text): Inline into the only call site for efficiency, as this is a very frequently called function. 2023-11-25 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/parsetexi/api.c (find_locales_dir): Remove unused function (it is also incorrect according to the comments). 2023-11-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/manipulate_tree.c (increase_ref_counter) (get_copy_ref): do not use intptr_t anymore for _counter associated integer, now that the integer is accessed more directly. 2023-11-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/extra.c (lookup_extra_string) (lookup_extra_integer, lookup_extra_contents): more check of consistency of lookup_* function with extra_* type. 2023-11-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/output_unit.h (relative_unit_direction_name), tp/Texinfo/XS/main/tree_types.h: move relative_unit_direction_name from tree_types.h to output_unit.h. Gavin idea. 2023-11-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_free_converter): free self->special_unit_body and self->special_unit_body_formatting. 2023-11-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/indices_in_conversion.c (index_content_element): def_command extra information is a string. * tp/Texinfo/XS/main/extra.c (lookup_extra_element): runtime check for extra_* type. * tp/Texinfo/XS/main/build_perl_info.c (store_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_contents) (lookup_extra_contents), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info, associate_info_references), tp/Texinfo/XS/main/tree.c (destroy_associated_info), tp/Texinfo/XS/main/tree_types.h (KEY_PAIR): use an ELEMENT_LIST to hold extra_contents extra information type data. * tp/Texinfo/XS/main/manipulate_tree.c (first_menu_node), tp/Texinfo/XS/main/output_unit.c (units_directions), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command) (handle_block_command), tp/Texinfo/XS/structuring_transfo/structuring.c (sectioning_structure) (get_node_node_childs_from_sectioning, check_nodes_are_referenced) (set_menus_node_directions, complete_node_tree_with_menus, nodes_tree) (print_down_menus, new_master_menu), tp/Texinfo/XS/structuring_transfo/transformations.c (reassociate_to_node, prepend_new_menu_in_node_section) (complete_node_menu, complete_tree_nodes_missing_menu) (regenerate_master_menu): use ELEMENT_LIST, lookup_extra_contents, add_extra_contents with extra_contents extra items. 2023-11-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/build_perl_info.c (store_additional_info): readd cast to intptr_t, as it should be tested on the platforms where it could matter. * tp/Texinfo/XS/main/extra.c (lookup_info_string): add lookup_info_string. * tp/Texinfo/XS/main/builtin_commands.c (element_command_name), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi), tp/Texinfo/XS/parsetexi/close.c (close_brace_command), tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line): use lookup_info_string. 2023-11-24 Patrice Dumas <pertusus@free.fr> Use an union for KEY_PAIR value. * tp/Texinfo/XS/main/tree_types.h (KEY_PAIR), tp/Texinfo/XS/main/build_perl_info.c (store_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (get_associated_info_key, add_*, lookup_*), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info) (associate_info_references), tp/Texinfo/XS/main/tree.c (destroy_associated_info): use a union for the KEY_PAIR value instead of casting. Replace add_associated_info_key by get_associated_info_key which does not set the value. Update other codes to use the union instead of value. 2023-11-24 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Common.pm (parse_node_manual), tp/Texinfo/Convert/HTML.pm (command_tree, _convert_xref_commands, _convert_menu_entry_type) (_normalized_label_id_file, _external_node_href), tp/Texinfo/Convert/Info.pm (format_node), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (node_line), tp/Texinfo/Convert/Texinfo.pm (link_element_to_texi) (check_node_same_texinfo_code), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), tp/Texinfo/ParserNonXS.pm (_end_line_misc_line) (_register_extra_menu_entry_information, _handle_close_brace), tp/Texinfo/Structuring.pm (associate_internal_references) (new_node_menu_entry), tp/Texinfo/XS/main/build_perl_info.c (build_perl_container, store_additional_info), tp/Texinfo/XS/main/debug.c (print_associate_info_debug), tp/Texinfo/XS/main/extra.c (add_extra_container), tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info) (associate_info_references), tp/Texinfo/XS/main/tree.c (destroy_associated_info), tp/Texinfo/XS/main/tree_types.h (extra_type), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), tp/Texinfo/XS/parsetexi/menus.c (register_extra_menu_entry_information), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace), tp/Texinfo/XS/structuring_transfo/structuring.c (new_node_menu_entry): have parse_node_manual in perl return an element as in C. Update callers. In C use a new extra type, extra_container, very similar to extra_contents, but passed to perl as an element with contents, in build_perl_container. 2023-11-23 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (command_tree, _convert_xref_commands) (_convert_menu_entry_type), tp/Texinfo/Convert/Info.pm (format_node), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert): always use 'manual_content' and 'node_content' in an element with them as sole contents. * tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (process_footnotes, node_line) (image_formatted_text, format_image, _convert): avoid using contents separately from the element they are content of. 2023-11-23 Gavin Smith <gavinsmith0123@gmail.com> * info/window.c (window_make_modeline): Include any numbered version suffix in the displayed manual name, so automake-1.16.info.gz displays as (automake-1.16) not (automake-1). 2023-11-23 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/configure.ac (perl_conf_LDFLAGS) [MS-Windows]: Append extra flags to perl_conf_LDFLAGS after -no-undefined check, rather than setting a HOST_NEEDS_NO_UNDEFINED automake conditional. (lookup_perl_conf): No longer AC_SUBST perl config values as these values are no longer required in Makefile.am. * tp/Texinfo/XS/Makefile.am (PLATFORM_LDFLAGS): No longer set or refer to separately from perl_conf_LDFLAGS. Confining changes to the compilation flags to configure.ac potentially makes it easier to include these changes in configure checks if it is ever found to be necessary. 2023-11-22 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi (Element Direction Information Type), tp/Texinfo/Convert/HTML.pm (%valid_direction_return_type): do not accept tree nor tree_nonumber as from_element_direction types. * doc/texi2any_api.texi (Target Commands Links@comma{} Texts and Associated Commands), tp/Texinfo/Convert/HTML.pm (command_tree) (command_text): separate command_tree function, using code from command_text to get the tree or tree without number. Update callers. * tp/Texinfo/Convert/HTML.pm (_file_header_information): do not use a command_string if the string is empty. 2023-11-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/main/get_perl_info.c (html_get_button_specification_list), tp/maintain/regenerate_C_options_info.pl: move html_get_button_specification_list to get_html_perl_info.c, as it is needed by options_get_perl.c in libtexinfoxs. 2023-11-22 Gavin Smith <gavinsmith0123@gmail.com> * INSTALL: elaborate on PERL_EXT_* variables for building XS modules, why they are needed and how to override them when running make. 2023-11-22 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/Makefile.am, * tp/Texinfo/XS/configure.ac (PERL_INC, XSUBPPARGS): Define in configure.ac and propagate to Makefile.am, so it is more clear what "archlibexp" and "privlibexp" from the Perl conf are being used for. 2023-11-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_special_unit_type): rename element as output_unit. * tp/Texinfo/XS/convert/convert_html.c (enum count_elements_in_filename_type, count_elements_in_filename): implement count_elements_in_filename. * tp/Texinfo/Convert/HTML.pm (_XS_converter_initialize) (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): get special_unit_body formatting references from perl. * tp/Texinfo/XS/convert/convert_html.c (OUTPUT_UNIT_INTERNAL_CONVERSION, output_unit_conversion_external) (special_unit_body_formatting_external) (register_output_unit_conversion_function) (register_special_unit_body_formatting_function) (html_converter_initialize, convert_output_unit), tp/Texinfo/XS/main/converter_types.h (OUTPUT_UNIT_CONVERSION_FUNCTION) (SPECIAL_UNIT_BODY_FORMATTING, CONVERTER): add special unit body formatting function setup and the possibilty to convert output unit using a C function. * tp/Texinfo/XS/convert/convert_html.c (convert_special_unit_type), tp/Texinfo/XS/convert/call_html_perl_function.c (call_formatting_function_format_navigation_header) (call_special_unit_body_formatting), tp/Texinfo/XS/convert/get_html_perl_info.c (html_get_button_specification_list), tp/Texinfo/XS/main/converter_types.h (enum button_specification_type) (enum button_information_type, BUTTON_SPECIFICATION_INFO) (BUTTON_SPECIFICATION, BUTTON_SPECIFICATION_LIST), tp/Texinfo/XS/main/document_types.h, tp/maintain/regenerate_C_options_info.pl: add preliminary types for buttons specifications, declare struct OPTIONS in document_types.h and converter_types.h to avoid an interdependency between those files and included files and options_types.h. Get buttons specifications from perl. Add functions to call format_navigation_header and special unit body formatting from C. Incomplete implementation of convert_special_unit_type. 2023-11-22 Patrice Dumas <pertusus@free.fr> * tp/maintain/setup_converters_code_tables.pl: set ENV{'TEXINFO_XS'} = 'omit' to avoid depending on XS code being loaded. 2023-11-22 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_get_css_elements_classes): free selectors. * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state), tp/Texinfo/XS/main/converter_types.h (CSS_LIST, CSS_SELECTOR_STYLE): free self->page_name_number, self->page_css and self->css_element_class_styles structures. Free self->pending_closes stack. 2023-11-21 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (html_get_css_elements_classes) (_default_format_css_lines), doc/texi2any_api.texi (Customizing CSS): have html_get_css_elements_classes return a reference on an array, not an array. * tp/Texinfo/Convert/HTML.pm: rename $self->{'file_css'} as $self->{'page_css'}. * tp/Texinfo/Convert/HTML.pm (convert), tp/Texinfo/XS/convert/convert_html.c (html_convert_convert): set current_filename in _html_convert_convert. * tp/Texinfo/XS/main/get_perl_info.c (add_svav_to_string_list), tp/Texinfo/XS/main/get_perl_info.h (enum sv_string_type), tp/maintain/regenerate_C_options_info.pl: add the possibility to get utf-8 strings in add_svav_to_string_list, and use enum to specify the type of strings. Update callers. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_title_titlepage), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_prepare_output_sv), tp/Texinfo/XS/convert/convert_html.c (html_converter_prepare_output), tp/Texinfo/XS/main/converter_types.h (CSS_SELECTOR_STYLE) (CSS_SELECTOR_STYLE_LIST, CONVERTER): add html_converter_prepare_output_sv and call it in html_prepare_title_titlepage to have XS code called just before the conversion. html_converter_prepare_output_sv calls html_converter_prepare_output for code that do not need interaction with perl. Use those functions to import css_element_class_styles information from perl. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_convert_convert, convert_output_output_unit_internal) (html_prepare_title_titlepage, html_convert_output), tp/Texinfo/XS/main/converter_types.h (CURRENT_FILE_INFO, CONVERTER): use CURRENT_FILE_INFO for current_file, adding the index in output files. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_attribute_class) (html_get_css_elements_classes), tp/Texinfo/XS/convert/convert_html.c (compare_page_name_number, find_page_name_number) (compare_selector_style, find_css_selector_style) (collect_css_element_class, compare_strings) (html_get_css_elements_classes, protect_class_name) (html_attribute_class, html_set_pages_files, setup_output_simple_page) (html_prepare_units_directions_files) (html_prepare_units_directions_files), tp/Texinfo/XS/main/converter_types.h (PAGE_NAME_NUMBER) (PAGE_NAME_NUMBER_LIST, CSS_LIST, PAGES_CSS_LIST, CONVERTER): implement collect_css_element_class, protect_class_name, html_get_css_elements_classes and html_attribute_class in C, and add XS interfaces for html_attribute_class and html_get_css_elements_classes. 2023-11-21 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/Makefile.am (libtexinfoxs_la_LDFLAGS): Refer to $(perl_conf_LDFLAGS) instead of $(PERL_CONF_ccdlflags) to make it easier to compare with XSLIBS_LDFLAGS. (AM_LDFLAGS): Remove references to this variable throughout, as it is not defined anywhere any more, and not a variable the user should be redefining from the command line. 2023-11-21 Gavin Smith <gavinsmith0123@gmail.com> XS build flags * tp/Texinfo/XS/Makefile.am (XSLIBS_LDFLAGS): Add a comment stating that -avoid-version and -module are recognised by libtool to make it clear where to look for documentation on these options. No functional changes intended. 2023-11-20 Patrice Dumas <pertusus@free.fr> HTML css functions API change, split information and selector rules * doc/texi2any_api.texi (Simple Customization of CSS), tp/Texinfo/Convert/HTML.pm (css_add_info, css_set_selector_style) (css_get_info, css_selector_style), tp/init/sc_formatting_with_css.pm, tp/init/documentation_examples.pm: split css_set_selector_style out of css_add_info for setting of selector CSS style. Split css_selector_style out of css_get_info to get selector CSS style. Also css_get_info returns the list of selectors, not a hash. Update callers. 2023-11-20 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_target) (build_html_element_targets, add_html_element_target) (pass_html_element_targets, build_html_special_targets): split build_html_element_targets in three functions to be able to build one html target, and add one. * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): add a flag for file_changed_counter, to be sure that the state is rebuilt. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (register_added_target, get_target, html_command_id), tp/Texinfo/XS/main/converter_types.h (HTML_ADDED_TARGET_LIST) (CONVERTER): add get_target and html_command_id and rebuild perl state with a new target. 2023-11-20 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XSLoader.pm (init): avoid undefined value in warning message. * tp/Texinfo/Convert/HTML.pm (register_opened_section_level) (close_registered_sections_level): change variable names. * tp/Texinfo/Convert/HTML.pm (close_registered_sections_level): return a reference on an array, not an array. Update callers. * tp/Texinfo/Convert/HTML.pm (_initialize_output_state): initialize $self->{'pending_closes'} here. * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides), tp/Texinfo/XS/convert/ConvertXS.xs (html_register_opened_section_level) (html_close_registered_sections_level), tp/Texinfo/XS/convert/convert_html.c (html_register_opened_section_level) (html_close_registered_sections_level, html_finalize_output_state), tp/Texinfo/XS/main/command_stack.c (clear_string_stack), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add clear_string_stack. Implement register_opened_section_level and close_registered_sections_level in C with an XS interface. * tp/Texinfo/XS/main/command_stack.c (push_string_stack_string) (top_string_stack): add const. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state): declare multiple_pass variables inside the block. * doc/texi2any_api.texi: updates. 2023-11-20 Gavin Smith <gavinsmith0123@gmail.com> XS build flags * tp/Texinfo/XS/configure.ac (perl_conf_CFLAGS, perl_conf_LDFLAGS): Set and output with AC_SUBST. Append to CFLAGS and LDFLAGS for checks only. * tp/Texinfo/XS/Makefile.am: Reuse perl_conf_CFLAGS and perl_conf_LDFLAGS. This makes it clearer that we are adding the same flags for building as for configure checks. 2023-11-19 Patrice Dumas <pertusus@free.fr> * tp/texi2any.supp: Add suppression specification for leaks and errors associated to setenv, getenv and translations showing up with t/19def.t. 2023-11-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_free_converter): rename html_destroy as html_free_converter. * tp/Texinfo/XS/convert/ConvertXS.xs (destroy), tp/Texinfo/XS/convert/converter.c (converter_list, new_converter) (retrieve_converter, unregister_converter_descriptor), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): use a list of pointers to converters in converter_list. Add new_converter to allocate a converter, replacing register_converter. Add unregister_converter_descriptor that removes a converter from converter_list and frees it. * tp/Texinfo/XS/convert/converter.c (html_free_converter): free special_unit_info. Free html_document_context.stack. 2023-11-19 Patrice Dumas <pertusus@free.fr> * tp/texi2any.supp: Add suppression specification for leaks associated to switch_to_global_locale and setenv showing up with t/19def.t all_commands_delimiters. 2023-11-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c (set_output_converter_sv): free converter->conf itself after freeing the options if it was set. 2023-11-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (command_conversion_external) (type_conversion_external, register_type_conversion_function) (register_command_conversion_function, html_converter_initialize) (html_destroy, html_convert_css_string, convert_to_html_internal), tp/Texinfo/XS/main/converter_types.h (CONVERTER): make type_conversion_function and command_conversion_function array of structures, not of pointers on structures. 2023-11-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/converter_types.h (TYPE_CONVERSION_FUNCTION) (COMMAND_CONVERSION_FUNCTION): declare struct CONVERTER; before defining TYPE_CONVERSION_FUNCTION and COMMAND_CONVERSION_FUNCTION, and define those structures before CONVERTER. Solution from Gavin. 2023-11-19 Gavin Smith <gavinsmith0123@gmail.com> * tp/texi2any.supp: Add variant suppression specification for setenv error. 2023-11-19 Patrice Dumas <pertusus@free.fr> * INSTALL: document TEXINFO_XS_STRUCTURE and TEXINFO_XS_CONVERT use. 2023-11-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/ConvertXS.pm, tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/PlainTexinfo.pm, tp/Texinfo/Convert/Texinfo.pm, tp/Texinfo/Convert/Text.pm: load XS related to conversion only if structure is also done by XS. 2023-11-19 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Document.pm ($XS_parser, $XS_structuring, %XS_overrides) (%XS_structure_overrides, import): use hashes for XS overrides. Do not load rebuild_document and rebuild_tree if XS is not used for structure. 2023-11-19 Patrice Dumas <pertusus@free.fr> Explicit void for argument of C functions. Gavin report. 2023-11-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/main/tree_types.h: Correct file name in a comment. 2023-11-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/xspara.c (xspara__add_next): Check return value for u8_mbtouc as documented, by checking for 0xfffd (replacement character), instead of using the same as mbrtowc. 2023-11-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/parsetexi/context_stack.c (pop_context): Define with (void) parameter list rather than (). 2023-11-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/xspara.c: Remove include directives for several header files that we don't need any more due to using libunistring functions instead of locale-dependent libc functions. [_WIN32] (w32_setlocale, mbrlen, mbrtowc, iswspace, iswupper): Remove these now-unused implementations. 2023-11-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/texi2any.supp: Add suppression for memory leak with switch_to_global_locale. 2023-11-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/main/translations.c (translate_string): Remove commented-out code, the purpose of which is not evident. Remove FIXME comment as this should be working now we call switch_to_global_locale. 2023-11-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/main/translations.c (translate_string): Exdent preprocessor #ifndef directives. Add a return statement to #ifndef block to avoid wrapping the rest of the function in the #else block. 2023-11-18 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/main/translations.c (translate_string): Remove commented-out Perl code and comments. It's hard to read and does not match the current Perl code in Texinfo/Translations.pm. 2023-11-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_open_command_update_context, convert_to_html_internal) tp/Texinfo/XS/main/call_perl_function.c (call_latex_convert_to_latex_math): add call_latex_convert_to_latex_math to call Texinfo::Convert::LaTeX::convert_to_latex_math from XS, and use it in convert_to_html_internal. * tp/t/html_tests.t: do not skip mathjax tests with XS. 2023-11-18 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_open_command_update_context) (_convert_command_update_context, _open_type_update_context) (_convert_type_update_context, _convert), tp/Texinfo/XS/convert/convert_html.c (html_open_command_update_context) (html_convert_command_update_context, html_open_type_update_context) (html_convert_type_update_context, convert_to_html_internal): use functions for state update, and modify when updating takes place for types, before open and before the type element formatting. * tp/Texinfo/XS/convert/convert_html.c (special_characters_formatting): use numeric entities. * tp/Texinfo/XS/convert/convert_html.c (in_string): add. * tp/Texinfo/XS/convert/convert_html.c (convert_row_type) (types_internal_conversion_table): row type conversion in C. 2023-11-17 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/main/convert_utils.c (convert_to_utf8, convert_to_utf8_verbatiminclude): Rename function to avoid confusion with convert_to_utf8 in input.c. 2023-11-17 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/main/api_to_perl.c (croak_message): Add wrapper for Perl croak. Useful for debugging. 2023-11-17 Gavin Smith <gavinsmith0123@gmail.com> * tp/texi2any.supp: Use "..." in suppressions file to allow for varying numbers of times tdestroy_recurse appears in the stack trace. 2023-11-17 Patrice Dumas <pertusus@free.fr> * tp/maintain/regenerate_C_options_info.pl: handle value set from perl being undef. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): remove unused variable. 2023-11-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/ConvertXS.pm: remove fallback module. * tp/Texinfo/XSLoader.pm (init): update fatal error message. 2023-11-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/element_types.awk, tp/Texinfo/XS/main/converter_types.h (CONVERTER): output code defining TXI_TREE_TYPES_NUMBER to the number of tree element types. Update codes that used the last type instead. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/builtin_commands.c (TYPE_INDEX, type_name_index, compare_type_index_fn) (set_element_type_name_info, find_element_type), tp/Texinfo/XS/convert/ConvertXS.xs (init): prepare a list of element types names and type number in set_element_type_name_info and sort. Called from init in ConvertXS.xs. Add find_element_type to find the type of a type name and use it in html_converter_initialize_sv. 2023-11-17 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/command_stack.c (top_integer_stack): use correct function name instead of top_integer_context. * tp/Texinfo/XS/main/get_perl_info.c (converter_initialize) (set_output_converter_sv): set conf already in converter_initialize. * tp/Texinfo/XS/main/unicode.h (OTXI_UNICODE_TEXT_CASES): always increase var after appending. Use a constant "-". * tp/Texinfo/XS/convert/convert_html.c (special_characters_formatting) (in_non_breakable_space, in_space_protected) (OTXI_ISO_ENTITY_TEXT_CASES, OTXI_NO_ISO_ENTITY_TEXT_CASES) (OTXI_NO_BREAK_CASES, OTXI_SPACE_PROTECTION_CASES, OTXI_CONVERT_TEXT) (OTXI_ALL_CONVERT_TEXT, html_default_format_protect_text) (convert_text, html_converter_initialize) (types_internal_conversion_table), tp/Texinfo/XS/convert/converter.c (xml_format_text_with_numeric_entities), tp/Texinfo/XS/convert/converter.h (OTXI_NUMERIC_ENTITY_TEXT_CASES), tp/Texinfo/XS/main/converter_types.h (enum html_special_character) (STRING_WITH_LEN, CONVERTER): use macros to generate inline code for text conversion, remove protect_text_unicode_text, protect_text_use_iso_entities and protect_text_no_iso_entities. Setup special characters and line_break_element. 2023-11-16 Patrice Dumas <pertusus@free.fr> * tp/t/input_files/punctuation_small_case_accents_latin1.texi, tp/t/input_files/punctuation_small_case_accents_utf8.texi, tp/t/input_files/punctuation_small_case_accents_us_ascii.texi: add an encoded character in @sc. 2023-11-16 Gavin Smith <gavinsmith0123@gmail.com> * tp/texi2any.supp: Add valgrind suppression file. Add suppressions for setenv bug with perl 5.36 and earlier. 2023-11-16 Gavin Smith <gavinsmith0123@gmail.com> * contrib/nontests/latex2html.test: Remove. * contrib/nontests/bibtex.test, contrib/nontests/defs.in: Remove checks using hevea. * configure.ac: Delete commented-out AC_CHECK_PROGS line for hevea. * contrib/nontests/Makefile.am: Remove as file is unused. 2023-11-16 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (call_types_conversion, call_types_open, call_commands_conversion) (call_commands_open, call_output_units_conversion), tp/Texinfo/XS/convert/convert_html.c (TYPE_INTERNAL_CONVERSION) (convert_table_term_type, command_conversion_external) (command_open, type_conversion_external, type_open) (convert_to_html_internal, output_unit_conversion) (convert_output_unit, convert_convert_output_unit_internal): pass TEXT to gather conversion results instead of returning char *. Also more const for functions arguments. * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): use text->end for res_len if possible. 2023-11-16 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_convert_text, convert, output), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units): cache OUTPUT_CHARACTERS and OUTPUT_ENCODING_NAME equal to utf8 in self->use_unicode_text. * tp/Texinfo/Convert/HTML.pm (output): keep documentlanguage as in preamble until the beginning of conversion. * tp/Texinfo/XS/convert/convert_html.c (protect_text_unicode_text), tp/Texinfo/XS/main/unicode.h (OTXI_UNICODE_TEXT_CASES): add conversion of text to HTML with encoded characters. 2023-11-15 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/xspara.c (xspara_add_text, xspara__add_next): Cast char * to uint8_t * when calling u8_mbtouc to avoid a compiler warning. This is valid as we know the strings we are getting from Perl are UTF-8 encoded. (xspara_add_text): Avoid a warning about a variable possibly being undefined. 2023-11-15 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi (Conversion in Preformatted Context), tp/Texinfo/Convert/HTML.pm (in_preformatted_context), tp/Texinfo/Convert/HTML.pm (inside_preformatted): rename in_preformatted as in_preformatted_context and _in_preformatted_in_menu as inside_preformatted. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_new_document_context, convert_to_html_internal), tp/Texinfo/XS/main/build_perl_info.c (build_integer_stack), tp/Texinfo/XS/main/command_stack.c (push_integer_stack_integer) (pop_integer_stack, top_integer_context), tp/Texinfo/XS/main/converter_types.h (INTEGER_STACK, CONVERTER): replace the monospace stack by a generic integer stack with the same functionalities. Remove enum monospace_context. * tp/Texinfo/Convert/HTML.pm (in_preformatted_context) (inside_preformatted, _new_document_context) (_reset_unset_no_arg_commands_formatting_context, _convert), tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_document_context, build_html_formatting_state), tp/Texinfo/XS/convert/convert_html.c (html_new_document_context) (html_pop_document_context) (reset_unset_no_arg_commands_formatting_context) (convert_to_html_internal), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add states for preformatted_context and inside_preformatted, set together with preformatted_classes and composition_context, in order to access faster to the context. * tp/Texinfo/XS/convert/convert_html.c (in_preformatted_context) (inside_preformatted): add. 2023-11-15 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (TYPE_INTERNAL_CONVERSION) (types_internal_conversion_table, convert_table_term_type) (html_converter_initialize), tp/Texinfo/XS/main/converter_types.h (enum formatting_reference_status): add types_internal_conversion_table where type conversion implemented in C is registered, use it to replace type_conversion function. Implement convert_table_term_type as a type conversion function. * tp/Texinfo/XS/convert/convert_html.c (in_code, in_math, in_raw) (in_upper_case, in_verbatim): add. 2023-11-15 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.h, tp/Texinfo/XS/main/converter_types.h (HTML_ARGUMENTS_FORMATTED_FORMAT_TYPE, HTML_ARGS_FORMATTED) (HTML_ARG_FORMATTED): move from utils.h to converter_types.h. * tp/Texinfo/XS/convert/convert_html.c (command_conversion_external) (type_conversion_external, register_type_conversion_function) (register_command_conversion_function, html_converter_initialize) (html_initialize_output_state, html_destroy, html_convert_css_string) (convert_to_html_internal), tp/Texinfo/XS/main/converter_types.h (CONVERTER, TYPE_CONVERSION_FUNCTION, COMMAND_CONVERSION_FUNCTION): use directly function references to convert types and commands, in order to be able to replace functions calling perl by C functions. Rename type_conversion as type_conversion_external and command_conversion as command_conversion_external. 2023-11-15 Patrice Dumas <pertusus@free.fr> * doc/texi2any_api.texi (Simple Output Customization for Simple Commands with Braces): fix example. * tp/init/documentation_examples.pm: new example for uppercase. * tp/Makefile.tres, tp/t/init_files_tests.t (sc_formatting_with_css), tp/init/sc_formatting_with_css.pm: example of init file to format small caps with CSS. 2023-11-15 Patrice Dumas <pertusus@free.fr> Customization of uppercasing commands * doc/texi2any_api.texi (Customization of Commands Converting to Uppercase), tp/Texinfo/Config.pm ($GNUT_upper_case_commands) (texinfo_register_upper_case_command) (GNUT_get_upper_case_commands_info, GNUT_reinitialize_init_files), tp/Texinfo/Convert/HTML.pm (%default_upper_case_commands) (converter_initialize, _convert), tp/Texinfo/XS/convert/convert_html.c (html_format_init, convert_to_html_internal), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add possibility of customizing commands converting their argument to uppercase letters. 2023-11-15 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/converter.h (OTXI_PROTECT_XML_CASES), tp/Texinfo/XS/convert/converter.c (xml_format_text_with_numeric_entities, xml_protect_text): add code that can be inlined for the protection of XML special characters as OTXI_PROTECT_XML_CASES. Use in converter.c and base code more on misc.c code with memcmp and case. * tp/Texinfo/XS/convert/convert_html.c (OTXI_PROTECT_XML_FORM_FEED_CASES, html_default_format_protect_text) (protect_text_use_iso_entities, protect_text_no_iso_entities): setup OTXI_PROTECT_XML_FORM_FEED_CASES to be inlined for the protection of XML special charcters and form feeds. Implement protect_text_use_iso_entities and html_default_format_protect_text. 2023-11-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (%XS_overrides, %XS_conversion_overrides) (import): use hashes for association of overriden sub with XS sub. * tp/Texinfo/Convert/HTML.pm (_XS_format_init, import), tp/Texinfo/XS/convert/ConvertXS.xs (html_format_init), tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize) (html_format_init): add html_format_init function to be called once to setup C data that does not need any information on customization with code from html_converter_initialize. Setup XS interface. * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal): use current_commands_conversion and not commands_conversion and current_types_conversion and not types_conversion. * tp/Texinfo/XS/convert/convert_html.c (html_default_format_protect_text) (default_css_string_format_protect_text): implement. * tp/Texinfo/XS/convert/converter.c (xml_format_text_with_numeric_entities, xml_protect_text): implement. 2023-11-14 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/command_data.txt (item_LINE, itemx, defblock, defline, deftypeline): Remove contain_basic_inline flag. There is no reason an @anchor should not occur inside @item, inside @table, or the other commands, as no index entry is being created with the @anchor. Report from Ihor Radchenko <yantar92@posteo.net> for Org mode manual. 2023-11-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Translations.pm (import), tp/Texinfo/XS/Makefile.am, tp/Texinfo/XS/main/DocumentXS.xs (translations_configure), tp/Texinfo/XS/main/TranslationsXS.xs: rename configure as translations_configure and move to DocumentXS.xs. Do not build TranslationsXS anymore. 2023-11-14 Patrice Dumas <pertusus@free.fr> * Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm, Pod-Simple-Texinfo/pod2texi.pl: update for the move of functions to Texinfo::Document. 2023-11-14 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/DocumentXS.xs (rebuild_document, rebuild_tree) (remove_document_descriptor, remove_document, clear_document_errors) (set_document_options), tp/Makefile.am (dist_modules_DATA), tp/Texinfo/Document.pm (import, rebuild_document, rebuild_tree) (clear_document_errors), tp/Texinfo/XS/Makefile.am (DocumentXS_la_SOURCES): move rebuild_document, rebuild_tree, remove_document_descriptor, remove_document and clear_document_errors to a new XS associated to Texinfo::Document. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_destroy): output a debug message if the html converter is destroyed while there are error messages that have not been registered. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/tree.c (replace_element_in_list): add. * tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element) (prepare_special_units, prepare_footnotes_targets) (html_prepare_output_units_global_targets), tp/Texinfo/XS/main/build_perl_info.c (build_global_info_tree_info) (build_global_commands), tp/Texinfo/XS/main/command_data.awk, tp/Texinfo/XS/main/utils.c (delete_global_info) (delete_global_commands, get_cmd_global_multi_command) (get_cmd_global_uniq_command, get_global_document_command), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command) (handle_block_command), tp/Texinfo/XS/parsetexi/parser.c (register_global_command, store_document), tp/Texinfo/XS/structuring_transfo/structuring.c (warn_non_empty_parts) (set_menus_node_directions), tp/Texinfo/XS/structuring_transfo/transformations.c (regenerate_master_menu): use ELEMENT_LIST as container of global multi commands, not ELEMENT. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/call_html_perl_function.c (call_file_id_setting_label_target_name) (call_file_id_setting_node_file_name) (call_file_id_setting_sectioning_command_target_name), tp/Texinfo/XS/convert/convert_html.c (find_element_target) (prepare_special_units, add_element_target_to_list) (add_element_target, add_special_target, normalized_label_id_file) (new_sectioning_command_target, set_root_commands_targets_node_files) (prepare_index_entries_targets, prepare_footnotes_targets) (html_set_pages_files, convert_tree_new_formatting_context) (html_convert_css_string, convert_to_html_internal) (convert_output_unit), tp/Texinfo/XS/convert/converter.c (normalized_sectioning_command_filename, node_information_filename) (comma_index_subentries_tree), tp/Texinfo/XS/convert/indices_in_conversion.c (index_content_element), tp/Texinfo/XS/main/converter_types.h (HTML_TARGET), tp/Texinfo/XS/main/node_name_normalization.c (convert_to_normalized_internal, convert_to_normalized) (convert_to_identifier, normalize_transliterate_texinfo) (normalize_transliterate_texinfo_contents), tp/Texinfo/XS/main/utils.h (HTML_ARG_FORMATTED): mark elements as const in HTML conversion and node_name_normalization. 2023-11-13 Gavin Smith <gavinsmith0123@gmail.com> Update required gnulib modules for XS * tp/Texinfo/XS: Run "gnulib-tool --add-import uchar". 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_text.c (text_accents, text_heading) (convert_to_text_internal, convert_to_text): set element arguments and elemnts to const if they are not modified, to make sure that the Texinfo tree is not modified. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_text.c (ascii_accents_internal), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents), tp/Texinfo/XS/main/convert_utils.h, tp/Texinfo/XS/main/unicode.c (format_eight_bit_accents_stack, encoded_accents) (format_unicode_accents_stack_internal), tp/Texinfo/XS/main/utils.c (push_stack_element, pop_stack_element, destroy_accent_stack), tp/Texinfo/XS/main/utils.h (ELEMENT_STACK, ACCENTS_STACK): move ACCENTS_STACK and destroy_accent_stack to main/utils.c. Add a stack for elements, with elements unmodifed (const), in main/utils.c. Use that stack for accent commands. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_texinfo.c (convert_contents_to_texinfo, check_node_same_texinfo_code) (root_heading_command_to_texinfo), tp/Texinfo/XS/main/debug.c (print_associate_info_debug, print_element_debug_details), tp/Texinfo/XS/main/tree.c (last_args_child): mark elements in argument and in code as const when they are not modified. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_text.c (brace_no_arg_command) (text_heading), tp/Texinfo/XS/main/convert_utils.c (element_associated_processing_encoding, add_heading_number) (find_innermost_accent_contents, convert_to_utf8) (encoded_input_file_name, expand_verbatiminclude) (definition_arguments_content, definition_category_tree), tp/Texinfo/XS/main/errors.c (message_list_line_error_internal) (message_list_command_error), tp/Texinfo/XS/main/tree.c (insert_list_slice_into_list, insert_slice_into_contents), tp/Texinfo/XS/main/utils.c (encode_with_iconv, decode_string) (encode_string, section_level): add const for source info and elements in argument for function that should not modify the argument they point to. Not much successful in making sure that the Texinfo tree is not modified, though. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/build_html_perl_state.c, tp/Texinfo/XS/convert/call_html_perl_function.c, tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/main/builtin_commands.c (element_builtin_data_cmd), tp/Texinfo/XS/main/output_unit.c (output_unit_texi), tp/Texinfo/XS/main/converter_types.h (FILE_NAME_PATH_COUNTER) (SPECIAL_UNIT_DIRECTION, CONVERTER), tp/Texinfo/XS/main/tree_types.h (OUTPUT_UNIT), tp/Texinfo/XS/main/utils.h (FILE_SOURCE_INFO): set output units and elements to be const whenever relevant to make sure that the tree and the output units are not modified. * tp/Texinfo/XS/main/build_perl_info.c (store_additional_info): set input element as const. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/indices_in_conversion.c (index_content_element), tp/Texinfo/XS/main/builtin_commands.c (element_command_name, element_builtin_cmd), tp/Texinfo/XS/main/convert_to_texinfo.c (expand_cmd_args_to_texi) (convert_to_texinfo_internal, convert_to_texinfo) (link_element_to_texi, target_element_to_texi_label), tp/Texinfo/XS/main/debug.c (debug_element_command_name) (print_element_debug, debug_print_element), tp/Texinfo/XS/main/extra.c (lookup*), tp/Texinfo/XS/main/utils.c (get_label_element): add const to elements in input of soe functions, especially for conversion to Texinfo, to make sure that the tree is not modified by the conversion. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/node_name_normalization.c (normalize_top_name) (convert_to_identifier): never free input of normalize_top_name, result always need to be freed. * tp/Texinfo/XS/main/node_name_normalization.c (normalize_top_name) (unicode_to_protected, protect_unicode_char): set input text to be const. 2023-11-13 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/parsetexi/def.c (split_delimiters, split_def_args), tp/Texinfo/XS/structuring_transfo/transformations.c (protect_first_parenthesis, protect_text) (protect_hashchar_at_line_beginning_internal): call relocate source marks only if there are source marks. Do not initialize variables that do not need to be. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/converter.c (register_converter), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/get_perl_info.c (converter_initialize), tp/Texinfo/XS/main/utils.c: use a local variable as initial converter before calling register_converter. Pass converter to converter_initialize. Remove new_converter function. * tp/Texinfo/XS/convert/converter.c (set_global_document_commands), tp/Texinfo/XS/main/utils.c (set_informative_command_value) (set_global_document_command): pass options and global commands to set_informative_command_value and set_global_document_command, not converters. * tp/Texinfo/XS/main/converter_types.h (TRANSLATED_SUI_ASSOCIATION), tp/Texinfo/XS/main/utils.c: move TRANSLATED_SUI_ASSOCIATION to converter_types.h. * tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_output), tp/Texinfo/XS/main/build_perl_info.c (build_output_files_information): pass converter SV to build_output_files_information and pass directly OUTPUT_FILES_INFORMATION. * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES), tp/Texinfo/XS/main/converter_types.h, tp/Texinfo/XS/main/document_types.h (enum error_type, ERROR_MESSAGE) (ERROR_MESSAGE_LIST, GLOBAL_INFO, DOCUMENT, EXPANDED_FORMAT): move parsed document types to a new file, document_types.h. Update includes for all the files. * tp/Texinfo/XS/convert/convert_html.c (html_global_unit_direction_names, html_conversion_context_type_names) (html_formatting_reference_names, html_argument_formatting_type_names) (special_unit_info_type_names, translated_special_unit_info), tp/Texinfo/XS/main/utils.c: move code used in HTML conversion to convert_html.c. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Common.pm (split_custom_heading_command_contents), tp/t/init/translation_in_parser_in_translation.pm, tp/Texinfo/XS/main/utils.c: do not use trim_spaces_comment_from_content in split_custom_heading_command_contents and translation_in_parser_in_translation.pm and remove trim_spaces_comment_from_content. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/floats.c (add_to_listoffloats_list) (float_list_to_listoffloats_list, destroy_listoffloats_list), tp/Texinfo/XS/main/tree_types.h (LISTOFFLOATS_TYPE), tp/Texinfo/XS/structuring_transfo/structuring.c (number_floats): use ELEMENT_LIST for float_list in listoffloats data, directly and not as a pointer. Change add_to_listoffloats_list to return the listoffloats type if found, and create a new one otherwise. 2023-11-12 Patrice Dumas <pertusus@free.fr> Separate types for list of floats and list of listoffloats * tp/Texinfo/XS/main/build_perl_info.c (build_document), tp/Texinfo/XS/main/converter_types.h (DOCUMENT), tp/Texinfo/XS/main/document.c (destroy_document_information_except_tree), tp/Texinfo/XS/main/floats.c (add_to_float_record_list) (add_to_listoffloats_list, find_float_type) (float_list_to_listoffloats_list, destroy_listoffloats_list), tp/Texinfo/XS/main/tree_types.h (LISTOFFLOATS_TYPE) (LISTOFFLOATS_TYPE_LIST, FLOAT_RECORD_LIST), tp/Texinfo/XS/parsetexi/parser.c (store_document), tp/Texinfo/XS/structuring_transfo/structuring.c (number_floats): add new types for listoffloats lists LISTOFFLOATS_TYPE_LIST instead of using the same as for floats lists. Rename a field of floats lists structure. Add add_to_listoffloats_list as a distinct function to add to LISTOFFLOATS_TYPE_LIST. Update DOCUMENT and functions to use the relevant types. * tp/Texinfo/XS/parsetexi/end_line.c (end_line_starting_block): no initialization of float_type, it is not used and is confusing. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/parsetexi/parser.h (parser_float_list), tp/Texinfo/XS/parsetexi/parser.c (store_document), tp/Texinfo/XS/parsetexi/end_line.c (parser_float_list) (end_line_starting_block): rename global float_records as parser_float_list. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (prepare_index_entries_targets), tp/Texinfo/XS/convert/converter.c (comma_index_subentries_tree, free_comma_index_subentries_tree): have comma_index_subentries_tree return an ELEMENT_LIST. * tp/Texinfo/XS/main/output_unit.c (split_by_node): set pending_parts to be an ELEMENT_LIST. * tp/Texinfo/XS/parsetexi/parser.c (rearrange_tree_beginning): use an ELEMENT_LIST for first_types. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_text.c (text_accents), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents) (destroy_accent_stack), tp/Texinfo/XS/main/convert_utils.h (ACCENTS_STACK): put the stack in ACCENTS_STACK directly, not as a pointer. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_text.c (ascii_accent) (ascii_accents_internal), tp/Texinfo/XS/main/unicode.c (unicode_accent, format_eight_bit_accents_stack) (format_unicode_accents_stack_internal, encoded_accents), tp/Texinfo/XS/main/utils.c (normalize_encoding_name): make some variables const to make sure that the accent formatting function do not modify their associated elements, texts or accent commands lists. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/convert_to_text.c (ascii_accent) (ascii_accents_internal): call encoded_accents with ascii_accent as argument, not ascii_accents_internal. Add an unused set_case argument to ascii_accent to have a prototype matching with the prototype used by encoded_accents. * tp/Texinfo/XS/main/convert_to_text.c (ascii_accents_internal), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents) (destroy_accent_stack), tp/Texinfo/XS/main/convert_utils.h (ACCENTS_STACK), tp/Texinfo/XS/main/unicode.c (format_eight_bit_accents_stack, encoded_accents) (format_unicode_accents_stack_internal): use an ELEMENT_LIST for the ACCENTS_STACK stack. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (prepare_special_units) (set_root_commands_targets_node_files), tp/Texinfo/XS/main/build_perl_info.c (build_elements_list) (build_document), tp/Texinfo/XS/main/converter_types.h (DOCUMENT), tp/Texinfo/XS/main/document.c (register_document_nodes_list) (register_document_sections_list) (destroy_document_information_except_tree), tp/Texinfo/XS/structuring_transfo/StructuringTransfo.xs (sectioning_structure, nodes_tree), tp/Texinfo/XS/structuring_transfo/structuring.c (sectioning_structure) (nodes_tree, check_nodes_are_referenced, set_menus_node_directions) (complete_node_tree_with_menus): use ELEMENT_LIST for nodes_list and sections_list. * tp/Texinfo/XS/structuring_transfo/StructuringTransfo.xs (fill_gaps_in_sectioning), tp/Texinfo/XS/structuring_transfo/structuring.c (get_node_node_childs_from_sectioning, new_complete_node_menu) (print_down_menus, new_master_menu), tp/Texinfo/XS/structuring_transfo/transformations.c (fill_gaps_in_sectioning, insert_nodes_for_sectioning_commands) (complete_node_menu, get_non_automatic_nodes_with_sections) (complete_tree_nodes_menus, complete_tree_nodes_missing_menu): use ELEMENT_LIST for fill_gaps_in_sectioning, get_node_node_childs_from_sectioning, print_down_menus and get_non_automatic_nodes_with_sections. * tp/Texinfo/XS/structuring_transfo/transformations.c (reassociate_to_node, insert_nodes_for_sectioning_commands): use ELEMENT_LIST for new_previous. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/tree.c (new_list, destroy_list), tp/Texinfo/XS/structuring_transfo/transformations.c (modify_tree) (protect_text, protect_hashchar_at_line_beginning_internal) (reference_to_arg_internal): add new_list and destroy_list, use those functions. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/tree.c (insert_list_slice_into_list) (insert_slice_into_contents, insert_list_slice_into_args) (insert_list_slice_into_contents): add insert_list_slice_into_list, use it in other functions, add insert_list_slice_into_args and insert_list_slice_into_contents. Remove insert_contents_slice_into_args. * tp/Texinfo/XS/structuring_transfo/transformations.c (modify_tree) (reference_to_arg_internal, protect_text) (protect_hashchar_at_line_beginning_internal): change function called by modify_tree to return element lists instead of elements. Update functions use as modify_tree argument. 2023-11-12 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/xspara.c (xspara_add_text): Keep running total of return values of uc_width and pass it to xspara_add__next. Remove an apparently obsolete comment about the width of accent characters. (xspara__add_next): Take extra argument. If non-negative, use for the column count of the word, rather than using uc_width. This way we avoid calling it twice for every character. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c (get_sv_index_entries_sorted_by_letter): use indices_info_index_by_name. Use entry_idx_in_index for index in index_entries. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): free path_encoding. * tp/Texinfo/XS/main/convert_utils.c: change in spacing. 2023-11-12 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (HTML_COMMAND_STRUCT) (register_format_context_command, convert_to_html_internal): set context command context string dynamically. * tp/Texinfo/XS/convert/converter.c (set_file_path): add more messages for file paths already set/reset, as in perl, and handle memory correctly in that case. 2023-11-12 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/xspara.c (xspara__add_next, xspara_add_next): Remove unnecessary casts to ucs4_t when calling uc_width. Advice from Bruno. 2023-11-11 Gavin Smith <gavinsmith0123@gmail.com> Update required gnulib modules for XS * tp/Texinfo/XS: Run "gnulib-tool --remove-import wcwidth c32width c32isupper", and "gnulib-tool --import unictype/ctype-upper". 2023-11-11 Gavin Smith <gavinsmith0123@gmail.com> Revised locale-independent paragraph formatting. * tp/Texinfo/XS/xspara.c (PARAGRAPH) <last_letter>: Declare as char32_t instead of wchar_t. (xspara_add_text, xspara__add_next): Use gnulib/libunstring function u8_mbtouc instead of mbrtowc or btowc, uc_width instead of wcwidth, and uc_is_upper instead of iswupper. (xspara_init): Eliminate lengthy code attempting to switch to a locale with UTF-8 encoding. * tp/Texinfo/XS/Makefile.am (XSParagraph_la_LDFLAGS): Link with $(LTLIBC32CONV), set from gnulib. Patch originally applied 2023-11-09 and reverted 2023-11-10. Advice to use uc_width instead of c32width from Bruno Haible. c32width does not work for non-ASCII characters in the C locale. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state), tp/Texinfo/XS/convert/converter.c (free_output_unit_files_file) (clear_output_unit_files, free_output_unit_files) (free_generic_converter): clear/free output_unit_files information. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state), tp/Texinfo/XS/convert/converter.c (free_generic_converter), tp/Texinfo/XS/main/convert_utils.c (free_unclosed_files) (free_output_files_information, clear_output_files_information): clear/free output_files_information. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_destroy), tp/Texinfo/XS/convert/convert_html.c (reset_unset_no_arg_commands_formatting_context): free html_command_conversion strings and trees for no args commands, free no_arg_formatted_cmd, free translated_to_convert when replacing it in reset_unset_no_arg_commands_formatting_context. * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): comment out allocating memory for style converting, as it is not used/tested/freed for now. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files), tp/Texinfo/XS/convert/convert_html.c (html_destroy_files_source_info): free files_source_info. * tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files): free top_node_filename_str, filename and output_unit_file_name file names setting loop, and unit_file_name_paths. * tp/Texinfo/XS/convert/convert_html.c (html_translate_names): free/destroy text or tree before replacing. * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): free encoded_out_filepath. * tp/Texinfo/XS/main/output_unit.c (units_directions): use an ELEMENT_LIST for up_list instead of an ELEMENT, and free. * tp/Texinfo/XS/main/translations.c (replace_convert_substrings): free convert_to_texinfo debug string. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/converter_types.h (HCC_CONTEXT_TYPES_LIST), tp/Texinfo/XS/main/utils.h: move definition of HCC_CONTEXT_TYPES_LIST to main/converter_types.h. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_translated_names), tp/Texinfo/XS/convert/convert_html.c (reset_unset_no_arg_commands_formatting_context) (html_translate_names), tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER): change html_command_conversion in converter to be a two dimension array with known size. 2023-11-11 Gavin Smith <gavinsmith0123@gmail.com> Remove hevea support from texi2dvi * util/texi2dvi (run_hevea, run_tex4ht): Remove. (run_tex_suite): Call run_tex directly instead of run_core_conversion. (run_core_conversion): Remove. (top level): Remove options --info, --html, --text, --tex4ht. (out_lang_set, out_lang_ext, out_lang_tex): Do not recognize "html", "info" or "text". (usage): Update usage message. (latex2html): Remove variable. (index_file_p, make_tex_cmd, run_index, run_tex_suite): Do not check value of $latex2html. It did not work at all due to calls to make_tex_cmd in run_tex_suite (added 2019-04-08) and in make_openout_text, called via decide_aux_files_method (added 2015-09-02). Even when I disabled those calls, there were other errors. Since nobody has complained in 8 years, it is probably not important, and it complicates the script significantly anyway, integrated into many parts of the code for a very rare if non-existent use case. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (destroy), tp/Texinfo/Convert/Converter.pm (import, destroy), tp/Texinfo/Convert/Text.pm(import, destroy), tp/Texinfo/XS/convert/convert_html.c (html_destroy), tp/Texinfo/XS/convert/converter.c (free_generic_converter), tp/Texinfo/XS/main/convert_utils.c (destroy_translated_commands), tp/t/test_utils.pl (test), tp/texi2any.pl: add function, XS interface and C code to destroy a converter, to free its memory, called both in texi2any.pl and test_utils.pl. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (html_finalize_output_state), tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state) (html_check_transfer_state_finalization): add checks on final converter output state and on state used to sync perl converter state after the last sync of perl state. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state), tp/Texinfo/XS/convert/indices_in_conversion.c (destroy_merged_indices) (destroy_indices_sorted_by_letter): free merged indices, indices sorted by letter and title_titlepage. 2023-11-11 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/tree_types.h (INDEX), tp/Texinfo/XS/main/converter_types.h (MERGED_INDEX) (LETTER_INDEX_ENTRIES, INDEX_SORTED_BY_LETTER): rename structure fields related to index numberof entries or space for entries and letter number. Update code using those structures. * tp/Texinfo/XS/main/build_perl_info.c (build_single_index_data): rename i as index. * tp/Texinfo/XS/convert/convert_html.c: reindent. 2023-11-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (get_index_entries_sorted_by_letter), tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/main/get_perl_info.c (get_sv_index_entries_sorted_by_letter): set index_entries_by_letter as a pointer on INDEX_SORTED_BY_LETTER, not a pointer on pointer. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_index_entries_sorted_by_letter): add a zeroed entry to mark the end of the array. strdup letter string. Check that index entry index name is set in perl. When finding the index entry in C index data, verify that the index number from perl leads to an index consistent with index size. Debug message if the index entry is not found. 2023-11-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/indices_in_conversion.c (merge_indices): add a trailing zeroed merged index index entry. 2023-11-10 Gavin Smith <gavinsmith0123@gmail.com> * util/texi2dvi (move_to_dest): When --output is given, report that a file was moved successfully. Error out if the file could not be moved. Jonathan Dushoff <dushoff@mcmaster.ca> reported that the output with the --output option was confusing, as TeX would not print the name of the final location. 2023-11-10 Gavin Smith <gavinsmith0123@gmail.com> * util/texi2dvi (move_to_dest): Rearrange code slightly for simplicity and change a variable name. No functional changes intended. 2023-11-10 Gavin Smith <gavinsmith0123@gmail.com> * util/texi2dvi (move_to_dest): Only take a single argument, as it is only called with multiple arguments when outputing to Info with hevea, which is an extremely niche use case. In fact, running with hevea (--html or --info on a LaTeX source) appears to be broken. (Loop introduced on 2006-06-27.) (run_hevea): Put the loop here. Code not tested. 2023-11-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (import, _XS_html_merge_index_entries) (_sort_index_entries), tp/Texinfo/XS/convert/ConvertXS.xs (html_merge_index_entries), tp/Texinfo/XS/convert/convert_html.c (html_merge_index_entries): rename sort_index_entries as html_merge_index_entries, add an XS override and call it. * tp/Texinfo/XS/convert/convert_html.c (html_merge_index_entries), tp/Texinfo/XS/convert/indices_in_conversion.c (merge_indices), tp/Texinfo/XS/main/converter_types.h (CONVERTER): set index_entries as a pointer on MERGED_INDEX, not a pointer on pointer. * tp/Texinfo/XS/convert/indices_in_conversion.c (merge_indices): update and fix code, in particular to store index without another index merged in. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units), tp/Texinfo/XS/convert/convert_html.c (set_root_commands_targets_node_files, html_set_pages_files) (convert_output_output_unit_internal), tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/main/get_perl_info.c (converter_initialize): put error_messages directly in converter, not as a pointer. * tp/Texinfo/XS/main/errors.c (wipe_error_messages) (wipe_error_message_list, clear_error_message_list), tp/Texinfo/XS/main/build_perl_info.c (pass_converter_errors): add clear_error_message_list that clears messages but does not deallocate the list memory. Use clear_error_message_list instead of wipe_error_message_list to reuse memory in converter. * tp/Texinfo/XS/main/utils.c (new_expanded_formats): remove format argument. Update callers. 2023-11-10 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files): strdup on the special_unit_filename for associated output units. * tp/Texinfo/XS/convert/convert_html.c (special_unit_variety_direction_index, html_converter_initialize), tp/Texinfo/XS/main/converter_types.h (CONVERTER): remove varieties_direction_index, do the index computation in special_unit_variety_direction_index. * tp/Texinfo/XS/convert/convert_html.c (reset_html_targets) (html_initialize_output_state, html_finalize_output_state): add reset_html_targets to free targets contents, called in html_finalize_output_state both for html_targets and html_special_targets. * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state): clear seen_ids, free special_units_direction_name, output_unit_file_indices and special_unit_file_indices. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_global_units_directions) (pass_html_global_units_directions), tp/Texinfo/XS/convert/convert_html.c (html_prepare_output_units_global_targets), tp/Texinfo/XS/main/converter_types.h (CONVERTER): change special_units_direction_name to be a list of SPECIAL_UNIT_DIRECTION, not a list of pointers. * tp/Texinfo/XS/main/get_perl_info.c (set_translated_commands), tp/Texinfo/XS/main/convert_utils.c (translated_command_tree), tp/Texinfo/XS/main/converter_types.h (CONVERTER): change translated_commands to be a list of TRANSLATED_COMMAND, not a list of pointers. * tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files): no memset for special_unit_file_indices and output_unit_file_indices as they are filled anyway. * tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_translated_names): use enum and SUIT_type_none. 2023-11-10 Gavin Smith <gavinsmith0123@gmail.com> Revert change on 2023-11-09 "Locale-independent XS paragraph formatting". This gives inconsistent test results between XS and pure Perl. Reverting until this can be investigated. 2023-11-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (reset_translated_special_unit_info_tree) (html_finalize_output_state, html_translate_names): add function reset_translated_special_unit_info_tree based on code from html_translate_names and use it in html_finalize_output_state too. * tp/Texinfo/XS/main/converter_types.h (enum special_unit_info_type) (enum special_unit_info_tree), tp/Texinfo/XS/convert/convert_html.c (special_unit_info_tree, reset_translated_special_unit_info_tree), tp/Texinfo/XS/main/utils.c (translated_special_unit_info), tp/Texinfo/XS/main/utils.h (TRANSLATED_SUI_ASSOCIATION): add *_none set to -1 for special_unit_info_type and special_unit_info_tree. Use enum as types more. 2023-11-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units), (tp/Texinfo/XS/convert/build_html_perl_state.c (build_html_special_targets, pass_html_special_targets), tp/Texinfo/XS/convert/convert_html.c (add_element_target) (add_special_target, set_special_units_targets_files) (prepare_associated_special_units_targets, unique_target) (new_sectioning_command_target, prepare_index_entries_targets) (prepare_footnotes_targets, html_set_pages_files) (html_initialize_output_state, html_translate_names), tp/Texinfo/XS/main/converter_types.h (CONVERTER): put html_special_targets, html_targets and seen_ids directly in CONVERTER, not as pointers. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize) (html_initialize_output_state): initialize converter global_units_directions in html_initialize_output_state. 2023-11-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/get_html_perl_info.c (html_converter_initialize_sv): use enum as type. 2023-11-09 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (add_element_target_to_list) (set_special_units_targets_files) (prepare_associated_special_units_targets) (new_sectioning_command_target, prepare_index_entries_targets) (prepare_footnotes_targets): strdup target in add_element_target_to_list. Free strings used in input. * tp/Texinfo/XS/convert/convert_html.c (html_translate_names): change variable name, use enum when possible. 2023-11-08 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Common.pm (copy_tree), tp/Texinfo/XS/main/manipulate_tree.c (copy_tree), tp/Texinfo/XS/structuring_transfo/StructuringTransfo.xs (copy_tree): remove second argument of copy_tree. Update callers. * tp/t/test_tree_copy.t: use copy_treeNonXS instead of skipping the test with a manual tree. 2023-11-09 Gavin Smith <gavinsmith0123@gmail.com> Locale-independent XS paragraph formatting * tp/Texinfo/XS/xspara.c (PARAGRAPH) <last_letter>: Declare as char32_t instead of wchar_t. (xspara_add_text, xspara__add_next): Use gnulib/libunstring function u8_mbtouc instead of mbrtowc or btowc, c32width instead of wcwidth, and c32isupper instead of iswupper. (xspara_init): Eliminate lengthy code attempting to switch to a locale with UTF-8 encoding. * tp/Texinfo/XS/Makefile.am (XSParagraph_la_LDFLAGS): Link with $(LTLIBC32CONV), set from gnulib. 2023-11-09 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS: Run "gnulib-tool --add-import c32isupper c32width unistr/u8-mbtouc". 2023-11-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (get_index_entries_sorted_by_letter), tp/Texinfo/XS/main/get_perl_info.c (get_sv_index_entries_sorted_by_letter): use INDEX ** in argument of get_sv_index_entries_sorted_by_letter and return an INDEX_SORTED_BY_LETTER ** instead of modifying a converter. 2023-11-07 Patrice Dumas <pertusus@free.fr> * tp/t/html_tests.t (mathjax_with_texinfo) (mathjax_with_texinfo_enable_encoding) (mathjax_with_texinfo_html_file): skip tests with conversion of Texinfo to LaTeX in HTML in math if using XS for conversion, as it is not implemented. 2023-11-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c: move copy_sv_options_for_convert_text to the end of the file. 2023-11-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/Makefile.am (ConvertXS_la_SOURCES), tp/Texinfo/XS/convert/get_html_perl_info.c, tp/Texinfo/XS/main/get_perl_info.c: move HTML specific code out of main/get_perl_info.c to convert/get_html_perl_info.c. 2023-11-07 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/Makefile.am (lib_LTLIBRARIES, xs_LTLIBRARIES): Place libtexinfo.la and libtexinfoxs.la in xs_LTLIBRARIES instead. 2023-11-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (output): fix get_output_files_XS_unclosed_streams function name. 2023-11-07 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/Makefile.am (ConvertXS_la_SOURCES), tp/Texinfo/XS/convert/call_html_perl_function.c, tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/call_perl_function.c, tp/Texinfo/XS/convert/build_html_perl_state.c: new files convert/call_html_perl_function.c and convert/build_html_perl_state.c with HTML specific content of call_perl_function.c and build_perl_info.c. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (import, _XS_get_unclosed_stream) (get_output_files_XS_unclosed_streams), tp/Texinfo/Convert/HTML.pm (output), tp/Texinfo/XS/convert/ConvertXS.xs (get_unclosed_stream), tp/Texinfo/XS/main/build_perl_info.c (build_output_files_unclosed_files): it is not possible to associate an unclosed stream to a SV from C. However, as found out by Gavin, it is possible to pass a stream through the XS interface. Therefore, in build_output_files_unclosed_files, the unclosed file name is registered, associated to undef, and the stream can then be passed to perl through a call of the new XS interface Texinfo::Convert::ConvertXS::get_unclosed_stream. Add get_unclosed_stream to retrieve the file streams of all the unclosed file paths that came from XS and are not associated to a stream and associate them to the unclosed files in output_files_information. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/build_perl_info.c, tp/Texinfo/XS/main/build_perl_info.c: move code specific of HTML to the end of the files. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_sort_index_entries), tp/Texinfo/XS/main/get_perl_info.c (get_sv_index_entries_sorted_by_letter): pass directly indices sorted by letter hash to XS. There is code to sort index names in XS, but it is commentted out as it is not clear that it is useful. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (import, _translate_names) (_prepare_conversion_units, _prepare_units_directions_files) (_prepare_title_titlepage, _html_convert_convert, convert) (_html_convert_output), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units): override directly perl functions. Add _html_convert_convert based on convert code to override conversion. Change html_prepare_conversion_units to match perl function call. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units) (html_prepare_units_directions_files, html_translate_names) (html_prepare_output_units_global_targets): set warning strings. * tp/Texinfo/XS/main/build_perl_info.c (pass_output_unit_files): increase ref count of references stored in converter. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_prepare_units_directions_files) (output, _html_set_pages_files): return files_source_info as a reference on a hash instead of a hash. * tp/Texinfo/Convert/HTML.pm (_prepare_units_directions_files), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files), tp/Texinfo/XS/main/build_perl_info.c (build_html_elements_in_file_count, pass_html_elements_in_file_count) (pass_output_unit_files): set elements_in_file_count, filenames, file_counters and out_filepaths on pperl converter from C/XS in _prepare_units_directions_files. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/build_perl_info.c (pass_html_global_units_directions): rename from set_html_global_units_directions. Update callers. * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_units), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units), tp/Texinfo/XS/main/build_perl_info.c (build_html_element_targets) (pass_html_element_targets, build_html_special_targets) (build_html_special_targets, pass_html_special_targets) (build_html_seen_ids, pass_html_seen_ids): set targets, special_targets, seen_ids and document_units from C/XS in _prepare_conversion_units. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_prepare_units_directions_files) (convert), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files) (html_prepare_output_units_global_targets), tp/Texinfo/XS/main/build_perl_info.c (build_html_global_units_directions) (set_html_global_units_directions): add set_html_global_units_directions to set in XS "global_units_directions" in perl converter instead of returning to perl. 2023-11-06 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/HTML.pm: remove converter_options_for_output, use the converter directly in all calling functions. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize), tp/Texinfo/XS/main/get_perl_info.c (html_converter_initialize_sv): move code mapping variety names to index in global_units_directions to html_converter_initialize. * tp/Texinfo/XS/main/get_perl_info.c (html_converter_initialize_sv): convert style commands element to UTF-8. Set converter HV only once. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize), tp/Texinfo/XS/main/get_perl_info.c (html_converter_initialize_sv): move allocation of space for translated tree types from html_converter_initialize_sv to html_converter_initialize. * tp/Texinfo/XS/main/converter_types.h (CONVERTER): put special_unit_varieties directly in the structure. Update codes using the strucutre. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c (converter_initialize) (html_converter_initialize_sv): split generic converter initialization out of html_converter_initialize_sv to converter_initialize. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/HTML.pm (converter_initialize): remove encode_converter_document from Texinfo::Convert::Converter and move corresponding code to the end of converter_initialize where XS converter is initialized. * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/main/get_perl_info.c (html_converter_initialize_sv): pass directly the converter to html_converter_initialize_sv. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (encode_converter_document), tp/Texinfo/XS/main/get_perl_info.c (set_translated_commands) (html_converter_initialize_sv): encode strings in XS, not in perl. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c, tp/Texinfo/XS/main/utils.h: remove more code related to sorting in C based on sortable entries from perl, get_sv_sortable_entries, KEY_ALPHA, SORTABLE_ENTRY and INDEX_SORTABLE_ENTRIES. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_sort_index_entries), tp/Texinfo/XS/main/get_perl_info.c (get_sv_index_entries_sorted_by_letter): pass index entries by letter directly as a hash. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_sort_index_entries), tp/Texinfo/XS/main/get_perl_info.c (get_sv_index_entries_sorted_by_letter): encode strings in get_sv_index_entries_sorted_by_letter by using SvPVutf8 instead of doing it in perl. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (import, _sort_index_entries), tp/Texinfo/XS/convert/ConvertXS.xs (sort_sortable_index_entries_by_letter), tp/Texinfo/XS/convert/indices_in_conversion.c (sort_indices_by_letter): remove code related to sorting in C based on sortable entries from perl, as it is unfinished because it requires a collation function in C, and the passing of data from perl need to be redone, it would be better to restart from scratch. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/Converter.pm (converter_options_for_output): rename encode_converter_for_output as converter_options_for_output. Update callers. * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_units) (_prepare_units_directions_files, _prepare_title_titlepage) (_html_convert_output), tp/Texinfo/Convert/Text.pm (select_text_options), tp/Texinfo/Translations.pm (_XS_gdt), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units) (html_prepare_units_directions_files) (html_prepare_title_titlepage, html_convert_output), tp/Texinfo/XS/main/TranslationsXS.xs (gettree), tp/Texinfo/XS/main/get_perl_info.c (copy_sv_options_for_convert_text): do not convert strings to UTF-8 in perl but in XS. Rename encode_text_options as select_text_options in Texinfo::Convert::Text. * tp/Texinfo/Translations.pm (import), tp/Texinfo/XS/main/TranslationsXS.xs (gdt): remove _XS_gettree, have a direct override of gdt (in comments, as it does not work). In XS, rename gettree as gdt and adapt call to match gdt call in perl. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Common.pm, tp/Texinfo/Config.pm (register_XS_document_main_configuration), tp/Texinfo/Convert/Converter.pm (encode_converter_document), tp/Texinfo/Convert/HTML.pm (_translate_names), tp/Texinfo/Convert/Text.pm (encode_text_options), tp/maintain/regenerate_C_options_info.pl: encode customization options strings in C and not in perl. The corresponding code is generated by regenerate_C_options_info.pl, using SvPVbyte for byte strings and SvPVutf8 to get UT-8 encoded strings for character strings. * tp/Texinfo/XS/main/TranslationsXS.xs (gettree): more compact code. 2023-11-05 Gavin Smith <gavinsmith0123@gmail.com> * contrib/tex3patch: Remove. The message in texinfo.tex that recommended this script was removed on 2003-07-27. It was said to work around a bug in "Unix TeX 3.0". It currently has no effect when running on texinfo.tex. 2023-11-05 Patrice Dumas <pertusus@free.fr> * NEWS: mention that PACKAGE* customization variables became PACKAGE*_OPTION. Mentioned by Arsen. 2023-11-05 Gavin Smith <gavinsmith0123@gmail.com> * contrib/texifont: Remove subdirectory. It has been untouched for over 10 years and has no prospect of further development. 2023-11-05 Gavin Smith <gavinsmith0123@gmail.com> Revert documentlanguage fix * tp/Texinfo/ParserNonXS.pm (_parse_def), * tp/Texinfo/XS/parsetexi/def.c (parse_def): Do not set type untranslated if @documentlanguage is not set at the time of parsing. * tp/t/languages.t (no_documentlanguage_before_copying): Skip test. This reverses change on 2023-11-01. Although it is correct, it slows the program down a lot when a lot of @def* are used and there is no @documentlanguage. This gets back to the execution times from texi2any 7.1 (with XS enabled only). 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm, tp/ext/highlight_syntax.pm, tp/init/documentation_examples.pm, tp/init/html32.pm, tp/t/init/ignore_and_comments_output.init, tp/t/init/mini_ker_t2h.init, tp/t/init/t2h_singular.init: handle undef contents for all commands and types conversion functions (and undef args). 2023-11-05 Patrice Dumas <pertusus@free.fr> Change customization of translations to target only translated string * tp/Texinfo/Translations.pm (translate_string): rename _gdt as translate_string. Update callers. * doc/texi2any_api.texi (Translated Strings Customization) (Translation Contexts), tp/Texinfo/Convert/HTML.pm (translate_string), (%default_formatting_references), tp/Texinfo/Translations.pm (gdt) (gdt_string), tp/Texinfo/XS/convert/convert_html.c (html_translate_string, html_gdt, html_gdt_tree, html_pgdt_tree) (special_unit_info_tree, html_translate_names) (convert_to_html_internal), tp/Texinfo/XS/main/call_perl_function.c (call_formatting_function_format_translate_message), tp/Texinfo/XS/main/get_perl_info.c, tp/init/documentation_examples.pm, tp/t/init/special_element_customization.pm, tp/t/init/translated_strings_customization.pm, tp/t/init/translation_in_parser_in_translation.pm: remove the possibility to customize the output of gdt or gdt_string, instead replace translate_string by the format_translate_message formatting function output. format_translate_message replaces format_translate_message_tree and format_translate_message_string. 2023-11-05 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Common.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/PlainTexinfo.pm, tp/Texinfo/Convert/Text.pm, tp/Texinfo/Structuring.pm, tp/Texinfo/Transformations.pm: always use main XS file first, and add use Texinfo::XSLoader if used in the module. * tp/Texinfo/Convert/ConvertXS.pm: only load if TEXINFO_XS_CONVERT is set. From Gavin. * tp/Texinfo/StructTransf.pm: only load if TEXINFO_XS_PARSER is not unset and TEXINFO_XS_STRUCTURE is not set to 0. From Gavin. * tp/Texinfo/Common.pm ($XS_structuring, import), tp/Texinfo/Structuring.pm ($XS_structuring, import), tp/Texinfo/Transformations.pm ($XS_structuring, import): load modules only if TEXINFO_XS_PARSER is not unset and TEXINFO_XS_STRUCTURE is not set to 0. From Gavin. * tp/t/test_utils.pl ($XS_structuring, test), tp/texi2any.pl: set no_build argument to parse_texi_* and consider that error messages are done in XS if TEXINFO_XS_PARSER is not unset and TEXINFO_XS_STRUCTURE is not set to 0. Based on Gavin idea. * tp/Texinfo/Convert/Text.pm ($XS_convert, _convert_tree_with_XS) (convert_to_text, output): call perl code preparing for XS call and calling XS functions only if TEXINFO_XS_CONVERT is set. 2023-11-04 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/utils.c, tp/Texinfo/XS/main/converter_types.h: remove HTML_CSS_FORMATTING_REFERENCES_LIST. * tp/Texinfo/Convert/HTML.pm (command_text): handle 'cmdname' not set to set context string by using the type. * tp/Texinfo/Convert/HTML.pm (_convert, _convert_style_command) (_convert_w_command, _convert_email_command) (_convert_explained_command, _convert_uref_command) (_convert_image_command, _convert_math_command) (_convert_indicateurl_command, _convert_titlefont_command) (_convert_U_command), tp/init/html32.pm, tp/init/documentation_examples.pm: if there are no arguments for a command, pass undef as args. Update converting functions to account for that change. * tp/Texinfo/Convert/Text.pm (encode_text_options), tp/Texinfo/XS/main/get_perl_info.c (get_expanded_formats): pass expanded_formats as a hash, never as an array. * tp/Texinfo/Convert/HTML.pm (_convert_before_item_type): handle undef $contents. * tp/Texinfo/Convert/HTML.pm (_new_document_context) (_reset_unset_no_arg_commands_formatting_context), tp/Texinfo/XS/convert/convert_html.c (html_new_document_context) (reset_unset_no_arg_commands_formatting_context): change in contexts names. * tp/Texinfo/Convert/HTML.pm (convert): set 'current_filename' earlier such that it is available in perl codes called by XS. * tp/Texinfo/Convert/HTML.pm (import, converter_initialize, convert) (_finalize_output_state, output), tp/Texinfo/XS/convert/ConvertXS.xs (html_initialize_output_state, html_finalize_output_state) (html_new_document_context, html_pop_document_context), tp/Texinfo/XS/convert/convert_html.c (html_new_document_context) (html_pop_document_context, html_converter_initialize) (html_finalize_output_state), tp/Texinfo/XS/main/build_perl_info.c (build_html_formatting_state), tp/Texinfo/XS/main/command_stack.c (html_top_document_context, html_top_formatting_context): add XS overrides for _new_document_context. push the first document context in _initialize_output_state, not in converter_initialize, add an argument for _initialize_output_state for the context name. Add _finalize_output_state to be called at the end of output, and add an XS override to pop the last document context. Add document_contexts_to_pop and document_context_change states to change only the document contexts that need to be when passing to perl. rename top_document_context as html_top_document_context and top_html_formatting_context as html_top_formatting_context. * tp/Texinfo/XS/convert/convert_html.c (html_gdt_string, html_gdt_tree) (html_pgdt_tree): prepend html_ to the function names. * tp/Texinfo/XS/convert/convert_html.c (html_gdt_string) tp/Texinfo/XS/main/build_perl_info.c (build_replaced_substrings), tp/Texinfo/XS/main/call_perl_function.c (call_formatting_function_format_translate_message_string): add strings customization support. * tp/Texinfo/XS/main/translations.c (translate_string): free langs pointers. * tp/Texinfo/XS/main/translations.c: use const for messages, contexts and language aruments. * tp/Texinfo/Convert/Converter.pm (%common_converters_defaults), tp/t/accents.t (test_enable_encoding): add document_descriptor as an option in Texinfo::Convert::Converter to retrieve a document even if only the descriptor is known, for instance if only the tree is available. Setup state and an XS converter by passing tree_document_descriptor as document_descriptor in option in accents.t, and by calling _initialize_output_state. * tp/Texinfo/Convert/HTML.pm (register_file_information) (get_file_information, _initialize_output_state): rename files_information state as html_files_information. 2023-11-04 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Structuring.pm (import), * tp/Texinfo/Transformations.pm (import): List overrided perl subroutines in a hash for more concise code. 2023-11-04 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/Common.pm (import): List overrided perl subroutines in a hash for more concise code. 2023-11-04 Gavin Smith <gavinsmith0123@gmail.com> * info/scan.c (write_tag_contents): Check if added text is of zero length in order to avoid subsequently calling memcpy with a null source argument. Report with -fsanitize=undefined on amd64 from Sam James <sam@gentoo.org>. 2023-11-03 Gavin Smith <gavinsmith0123@gmail.com> * tp/Texinfo/XS/Makefile.am: Make files depend on maintain/regenerate_C_options_info.pl if built by that script. 2023-11-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/build_perl_info.c (build_html_formatting_state): current_filename is found by get_info, therefore in converter_info there is a reference on the value in the converter hash. The associated SV should not be replaced such that its reference stays the same. Therefore for current_filename use sv_setpv to modify the value but not the SV to pass to perl. 2023-11-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (command_special_unit_variety) (prepare_special_units): rename command_special_unit_variety from contents_command_special_unit_variety and add footnotes. * tp/Texinfo/XS/convert/convert_html.c (special_unit_info_tree) (special_unit_info, prepare_special_units): use find_string. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize), tp/Texinfo/XS/main/converter_types.h (COMMAND_ID_INDEX, CONVERTER): add command_special_variety_name_index to converter that associate command names with indices in special_unit_varieties and the HF_special_variety flag for those commands. * tp/Texinfo/XS/convert/convert_html.c (html_get_tree_root_element): if find_container is set, return the output unit associated to commands that are associated with an output unit. 2023-11-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c, tp/Texinfo/XS/main/errors.c: add "%s" format for fprintf instead of using a string as format. Report from Gavin. 2023-11-03 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (converter_initialize), tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h (CONVERTER), tp/Texinfo/XS/main/get_perl_info.c (register_formatting_reference_default) (register_formatting_reference_with_default) (html_converter_initialize_sv): pass css strings commands and types conversion to C. To setup css strings formatting references, copy the formatting references and replace with specific css functions references. Do that for formatting functions, commands and types conversion. * tp/Texinfo/XS/convert/convert_html.c (command_conversion) (type_conversion, html_initialize_output_state), tp/Texinfo/XS/main/call_perl_function.c (call_types_conversion) (call_commands_conversion), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add current_formatting_references, current_commands_conversion and current_types_conversion in converter to be able to change formatting functions references lists as a whole. * tp/Texinfo/XS/convert/convert_html.c (html_convert_css_string) (reset_unset_no_arg_commands_formatting_context), tp/Texinfo/XS/main/build_perl_info.c (build_html_translated_names): implement css string conversion and pass translated css strings no arg commands back to perl. 2023-11-02 Gavin Smith <gavinsmith0123@gmail.com> * configure.ac, js/info.js, util/texi2dvi, util/texi2pdf: Bump version to 7.1dev. 2023-11-02 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/get_perl_info.c (add_svav_to_string_list): use a SV * in argument, not a SV **. Update callers. * tp/Texinfo/XS/main/get_perl_info.c (get_sv_options), tp/maintain/regenerate_C_options_info.pl: generate automatically get_sv_option to get one option value from perl and set the C option. Put get_sv_options in get_perl_info.c, that calls get_sv_option for each option set in perl. * tp/Texinfo/Convert/Converter.pm (import, _XS_set_conf, set_conf) (force_conf), tp/Texinfo/XS/convert/ConvertXS.xs (set_conf), tp/Texinfo/XS/main/get_perl_info.c (set_conf): XS interface to set customization options in C converter options. * tp/Texinfo/Convert/HTML.pm (_translate_names): always use XS if with XS. * tp/Texinfo/XS/convert/convert_html.c (reset_unset_no_arg_commands_formatting_context), tp/Texinfo/Convert/HTML.pm (_reset_unset_no_arg_commands_formatting_context): add context name in explanations of conversion. 2023-11-02 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): do not output the NUL in fwrite. * tp/Texinfo/XS/convert/convert_html.c (convert_to_html_internal): set HMSF_preformatted_classes after closing a style type. * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): pass output_unit_filename to format_end_file and format_begin_file instead of full paths. * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize): do not register pre class for non preformatted commands with small variants. * tp/Texinfo/XS/main/utils.c (SMALL_BLOCK_COMMANDS_LIST): fix typo in name. 2023-11-02 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files) (html_converter_initialize): initialize file_changed_counter in html_set_pages_files as it requires knowing the number of output files. * tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal): handle the case of no conversion to output encoding setup. * tp/Texinfo/XS/main/build_perl_info.c (init): initialize "utf-8" &output_conversions to be sure that it is set before other conversions. * tp/Texinfo/XS/main/utils.c (get_encoding_conversion): use strcasecmp to compare encoding names in a case-insensitive way. 2023-11-02 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_convert_output): correct fclose error status reading. * tp/Texinfo/XS/main/translations.c (replace_substrings): allocate output strings in all the cases. * tp/Texinfo/XS/main/errors.c (message_list_document_error_internal): show immediately error messages if DEBUG is set. 2023-11-02 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_html_convert_output), tp/Texinfo/XS/convert/convert_html.c (html_convert_output): only consider two cases for filenames, no filenames if output_file is the empty string '', filenames otherwise. * tp/Texinfo/Convert/HTML.pm (_html_convert_output, import) (_XS_html_prepare_title_titlepage, _prepare_title_titlepage, convert), tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_title_titlepage), tp/Texinfo/XS/convert/convert_html.c (html_prepare_title_titlepage) (html_convert_output): separate setting titlepage from main conversion, removing code from html_convert_output to put it in *_prepare_title_titlepage, replacing html_convert_init and _XS_html_convert_init for convert. * tp/Texinfo/XS/main/call_perl_function.c (call_formatting_function_format_title_titlepage): call build_html_formatting_state if needed. 2023-11-01 Patrice Dumas <pertusus@free.fr> * tp/Makefile.tres, tp/t/languages.t (no_documentlanguage_before_copying): test without @documentlanguage before @copying but a @documentlanguage before @insertcopying. From Gavin. 2023-11-01 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/ParserNonXS.pm (_parse_def), tp/Texinfo/XS/parsetexi/def.c (parse_def): set type untranslated and associate translation context even if @documentlanguage is not set at the time of parsing. @documentlanguage may indeed be set when converting. Report from Gavin. 2023-11-01 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_html_convert_output): if a special element body is empty, do not return immediately but check if there is already a body registered with the file, as in that case, the body would need to be output. * tp/Texinfo/Common.pm (output_files_open_out): warn if an unclosed file has already been registered. * tp/Texinfo/XS/main/utils.c (add_include_directory): simplify, set string argument const. * tp/Texinfo/Convert/HTML.pm (_html_convert_output), tp/Texinfo/XS/convert/convert_html.c (html_convert_output): rename $footer as $file_end and $header as $file_beginning. * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_units_directions_files), tp/Texinfo/XS/convert/convert_html.c (html_prepare_units_directions_files), tp/Texinfo/XS/convert/converter.c (initialize_output_units_files), tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files), tp/Texinfo/XS/convert/converter.c (find_output_unit_file) (add_output_units_file, set_output_unit_file) (register_normalize_case_filename, set_file_path), tp/Texinfo/XS/main/converter_types.h (CONVERTER): put output_unit_files directly in CONVERTER. Start indices of found files in output_unit_files list at 0. have set_output_unit_file and functions called by set_output_unit_file return indices in output_unit_files list. Setup converter output_unit_file_indices and special_unit_file_indices with each output unit output_unit_files file index. * tp/Texinfo/XS/convert/convert_html.c (unique_target), tp/Texinfo/XS/main/utils.c (find_string): add find_string function. * tp/Texinfo/XS/main/build_perl_info.c (newSVpv_byte): add newSVpv_byte. * tp/Texinfo/Convert/HTML.pm (_html_convert_output), tp/Texinfo/XS/convert/convert_html.c (convert_output_output_unit_internal, html_convert_output), tp/Texinfo/XS/main/build_perl_info.c (build_html_formatting_state), tp/Texinfo/XS/main/convert_utils.c (encoded_output_file_name), (register_unclosed_file, output_files_open_out) (output_files_register_closed), tp/Texinfo/XS/main/converter_types.h (ARRAY_INDEX_LIST, FILE_NAME_PATH_COUNTER, FILE_STREAM) (FILE_STREAM_LIST, OUTPUT_FILES_INFORMATION): finish C html_convert_output output implementation. Pass file counters back to perl. Add Texinfo::Common output_files_information API to C to open and register files. * tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_output), tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize), tp/Texinfo/XS/main/build_perl_info.c (build_output_files_unclosed_files, build_output_files_opened_files) (build_output_files_information): build perl converter output_files_information. * tp/texi2any.pl (%main_unclosed_files): rename %unclosed_files as %main_unclosed_files. 2023-10-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/main/call_perl_function.h (FILE_NAME_PATH) (TARGET_CONTENTS_FILENAME): move to call_perl_function.h. Update includes in many files. 2023-10-31 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm ($XS_convert): add a variable, set to 1 if $ENV{TEXINFO_XS_CONVERT} is 1 to run perl codes calling XS codes only if set. * tp/Texinfo/Convert/HTML.pm (import, _XS_html_convert_output) (_html_convert_output), tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_output), tp/Texinfo/XS/convert/convert_html.c (html_convert_output, convert_convert_output_unit_internal) (convert_output_output_unit_internal), tp/Texinfo/XS/main/call_perl_function.c (call_formatting_function_format_footnotes_segment) (call_formatting_function_format_end_file) (call_formatting_function_format_begin_file): add a separate function, _html_convert_output, for the main conversion code. A return of undef from that function means failure now, and not no text to output. Setup an XS interface to replace this code, with html_convert_output. Partial implementation in C code. 2023-10-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (output): rename $output for the no page case to $text_output. Move _do_js_files call out of the conversion code, to prepare for XS override. 2023-10-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_do_js_files, output): move code related to js files, both for INFO_JS_DIR and for js license file also for mathjax to the _do_js_files function. Call _do_js_files also if there is no output file, but only if TEST is not set, a combination which is very unlikely. * tp/Texinfo/Convert/HTML.pm (output), tp/t/test_utils.pl: update comments, in particular in output on unreachable code, as code that is unreachable corresponds to the case output_file ne '' and no pages. * tp/Makefile.tres, tp/t/html_tests.t (info_js_dir_html) (info_js_dir_html_text, mathjax_with_texinfo_html_file) (info_js_dir_html_file): more tests to test INFO_JS_DIR and check when associated files are created. * Changelog: remove some spaces. 2023-10-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (output): move js files copying code out of output units formatting loop. * tp/Texinfo/Convert/Converter.pm (output) (determine_files_and_directory), tp/Texinfo/Convert/HTML.pm (output): make sure that $destination_directory is defined. * tp/Texinfo/Convert/HTML.pm (_do_jslicenses_file, output): handle the case of empty directory string, avoid calling File::Spec->catdir in that case. * tp/Texinfo/Convert/HTML.pm (output): update code used in case there are no pages, even though the situation cannot arise. Also add comments. * tp/Texinfo/Convert/HTML.pm (output): simplify units conversion code in output(). 2023-10-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/XS/convert/convert_html.c (html_convert_tree): rename convert_tree as html_convert_tree. * tp/Texinfo/Convert/HTML.pm (_XS_html_convert_tree), tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_tree): immplementation of html_convert_tree XS interface, not used as convert_tree is not called on trees registered in XS. 2023-10-30 Patrice Dumas <pertusus@free.fr> * tp/texi2any.pl: do not rebuild the perl document/tree before calling convert_to_texinfo for MACRO_EXPAND if TEXINFO_XS_CONVERT is set. 2023-10-30 Patrice Dumas <pertusus@free.fr> * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_units, convert) (output): set contents and shortcontents early in convert and output, where other configurations options are set, and not in _prepare_conversion_units. * tp/Texinfo/XS/convert/convert_html.c (html_convert_convert): convert special units instead of output units twice... * tp/Texinfo/XS/main/build_perl_info.c (build_html_document_context): add missing call of build_html_document_context_ctx. * tp/Texinfo/XS/main/convert_to_texinfo.c (root_heading_command_to_texinfo): initialize tree, fix nesting of if, free text representation of command. * tp/Texinfo/Convert/Texinfo.pm (root_heading_command_to_texinfo): reorganize code, no functional change. * tp/Texinfo/Convert/HTML.pm (convert_output_unit), tp/Texinfo/XS/convert/convert_html.c (convert_outp