texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/XS/convert/get_html_perl_info.c (htm


From: Patrice Dumas
Subject: branch master updated: * 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_i [...]
Date: Sun, 07 Jan 2024 06:25:46 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 1e3502a432 * 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  [...]
1e3502a432 is described below

commit 1e3502a43287f5824fab88bfbb99f21052199acf
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 7 12:25:45 2024 +0100

    * 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.
---
 ChangeLog                                  |  18 ++
 tp/Texinfo/Convert/Text.pm                 |   2 +-
 tp/Texinfo/XS/convert/ConvertXS.xs         |   4 +-
 tp/Texinfo/XS/convert/get_html_perl_info.c | 223 ++---------------------
 tp/Texinfo/XS/convert/get_html_perl_info.h |   4 +-
 tp/Texinfo/XS/main/get_perl_info.c         | 279 +++++++++++++++++++++++++++++
 tp/Texinfo/XS/main/get_perl_info.h         |   2 +
 7 files changed, 314 insertions(+), 218 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9536fe8617..a61311bb0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+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)
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index d36e1f06b9..b98766b677 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -422,7 +422,7 @@ sub copy_options_for_convert_text($;$)
   return %options;
 }
 
-# Will never be called, used for the overrride.
+# Will never be called, used for the override.
 sub _convert_tree_with_XS($$)
 {
 }
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs 
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 41d46b935a..750537b405 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -838,8 +838,8 @@ html_get_target (SV *converter_in, SV *element_sv)
              int output_units_descriptor
                = get_output_units_descriptor_converter_sv (converter_in);
              ELEMENT *element;
-             element = find_element_from_sv (self, element_sv,
-                                             output_units_descriptor);
+             element = html_find_element_from_sv (self, element_sv,
+                                                  output_units_descriptor);
              if (element)
                {
                  HTML_TARGET *target_info = html_get_target (self, element);
diff --git a/tp/Texinfo/XS/convert/get_html_perl_info.c 
b/tp/Texinfo/XS/convert/get_html_perl_info.c
index 2a6007c97c..4a7ae17c28 100644
--- a/tp/Texinfo/XS/convert/get_html_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_html_perl_info.c
@@ -41,7 +41,6 @@ FIXME add an initialization of translations?
 #include "command_ids.h"
 #include "converter_types.h"
 #include "utils.h"
-#include "targets.h"
 #include "builtin_commands.h"
 #include "debug.h"
 #include "convert_to_texinfo.h"
@@ -1212,226 +1211,26 @@ html_converter_prepare_output_sv (SV *converter_sv, 
CONVERTER *converter)
 
 #undef FETCH
 
-/* find from an extra element index entry */
-int
-find_index_entry_numbers_extra_index_entry_sv (CONVERTER *converter,
-                            SV *extra_index_entry_sv, size_t *index_nr)
-{
-  AV *extra_index_entry_av;
-  SV **index_name_sv;
-  char *index_name = 0;
-
-  dTHX;
-
-  if (!converter->document->index_names)
-    return 0;
-
-  extra_index_entry_av = (AV *) SvRV (extra_index_entry_sv);
-
-  index_name_sv = av_fetch (extra_index_entry_av, 0, 0);
-  if (index_name_sv)
-    {
-      index_name = SvPVutf8_nolen (*index_name_sv);
-    }
-
-  if (index_name)
-    {
-      SV **number_sv = av_fetch (extra_index_entry_av, 1, 0);
-      if (number_sv)
-        {
-          int entry_number = SvIV (*number_sv);
-
-          *index_nr
-            = index_number_index_by_name (&converter->sorted_index_names,
-                                          index_name);
-          return entry_number;
-        }
-    }
-  return 0;
-}
-
-INDEX_ENTRY *
-find_index_entry_extra_index_entry_sv (CONVERTER *converter,
-                                       SV *extra_index_entry_sv)
-{
-  size_t index_nr;
-
-  int entry_number
-    = find_index_entry_numbers_extra_index_entry_sv (converter,
-                                                     extra_index_entry_sv,
-                                                     &index_nr);
-
-  if (entry_number)
-    return &converter->sorted_index_names.list[index_nr -1].index
-              ->index_entries[entry_number -1];
-
-  return 0;
-}
-
-ELEMENT *
-find_element_extra_index_entry_sv (CONVERTER *converter,
-                                   SV *extra_index_entry_sv)
-{
-  INDEX_ENTRY *index_entry = find_index_entry_extra_index_entry_sv
-                                        (converter, extra_index_entry_sv);
-  if (index_entry)
-    {
-      if (index_entry->entry_associated_element)
-        return index_entry->entry_associated_element;
-      else if (index_entry->entry_element)
-        return index_entry->entry_element;
-    }
-  return 0;
-}
-
-
 #define FETCH(key) key##_sv = hv_fetch (element_hv, #key, strlen(#key), 0);
-/* find C tree root element corresponding to perl tree element element_hv */
-ELEMENT *find_root_command (CONVERTER *converter, HV *element_hv,
-                            int output_units_descriptor)
-{
-  SV **associated_unit_sv;
-  ELEMENT *root;
-  size_t i;
-
-  dTHX;
-
-  FETCH(associated_unit)
-
-  if (associated_unit_sv)
-    {
-      /* find the associated ouput unit and then find the element
-         in unit contents */
-      HV *associated_unit_hv = (HV *) SvRV (*associated_unit_sv);
-      SV **unit_index_sv = hv_fetch (associated_unit_hv, "unit_index",
-                                     strlen ("unit_index"), 0);
-
-      if (unit_index_sv)
-        {
-          int unit_index = SvIV (*unit_index_sv);
-          const OUTPUT_UNIT_LIST *output_units
-           = retrieve_output_units (output_units_descriptor);
-
-          if (output_units && unit_index < output_units->number)
-            {
-              OUTPUT_UNIT *output_unit = output_units->list[unit_index];
-              size_t i;
-              for (i = 0; i < output_unit->unit_contents.number; i++)
-                {
-                  ELEMENT *content = output_unit->unit_contents.list[i];
-                  if (content->hv == element_hv)
-                    return content;
-                }
-            }
-        }
-    }
-
-  /* if there are no output units go through the root element children */
-  root = converter->document->tree;
-  for (i = 0; i < root->contents.number; i++)
-    {
-      ELEMENT *content = root->contents.list[i];
-      if (content->hv == element_hv)
-        return content;
-    }
-  return 0;
-}
-
-/* TODO nodedescription using the extra element_node and the
- * node extra node_description? */
 
 /* find C Texinfo tree element based on element_sv perl tree element.
    Only for elements that can be targets of links. */
 ELEMENT *
-find_element_from_sv (CONVERTER *converter, SV *element_sv,
+html_find_element_from_sv (CONVERTER *converter, SV *element_sv,
                       int output_units_descriptor)
 {
-  enum command_id cmd = 0;
   HV *element_hv;
-  SV **cmdname_sv;
-  SV **extra_sv;
   SV **type_sv;
+  ELEMENT *element;
 
   dTHX;
 
-  element_hv = (HV *) SvRV (element_sv);
-
-  FETCH(cmdname)
-
-  if (cmdname_sv && output_units_descriptor)
-    {
-      char *cmdname = SvPVutf8_nolen (*cmdname_sv);
-      cmd = lookup_builtin_command (cmdname);
+  element = find_element_from_sv (converter, 0, element_sv,
+                                  output_units_descriptor);
+  if (element)
+    return element;
 
-      if (builtin_command_data[cmd].flags & CF_root
-          && cmd != CM_node)
-        {
-          ELEMENT *element = find_root_command (converter, element_hv,
-                                                output_units_descriptor);
-          if (element)
-            return element;
-        }
-    }
-
-  FETCH(extra)
-
-#define EXTRA(key) key##_sv = hv_fetch (extra_hv, #key, strlen(#key), 0);
-  if (extra_sv)
-    {
-      HV *extra_hv = (HV *) SvRV (*extra_sv);
-      SV **normalized_sv;
-      SV **global_command_number_sv;
-      SV **index_entry_sv;
-      SV **associated_index_entry_sv;
-
-      EXTRA(normalized)
-      if (normalized_sv)
-        {
-          char *normalized = SvPVutf8_nolen (*normalized_sv);
-          if (converter->document->identifiers_target)
-            {
-              ELEMENT *element_found
-                = find_identifier_target
-                      (converter->document->identifiers_target, normalized);
-         /* check the element found in case of multiple defined identifier */
-              if (element_found && element_hv == element_found->hv)
-                return element_found;
-            }
-        }
-
-      EXTRA(global_command_number)
-      if (global_command_number_sv)
-        {
-          int global_command_number = SvIV (*global_command_number_sv);
-          ELEMENT_LIST *global_cmd_list
-            = get_cmd_global_multi_command (
-                          converter->document->global_commands, cmd);
-
-          if (global_command_number > 0
-              && global_command_number - 1 < global_cmd_list->number)
-            return global_cmd_list->list[global_command_number - 1];
-        }
-
-      EXTRA(associated_index_entry)
-      if (associated_index_entry_sv)
-        {
-          ELEMENT *index_element = find_element_extra_index_entry_sv 
(converter,
-                                               *associated_index_entry_sv);
-          /* there should be no ambiguity, but we check nevertheless */
-          if (index_element && index_element->hv == element_hv)
-            return (index_element);
-        }
-
-      EXTRA(index_entry)
-      if (index_entry_sv)
-        {
-          ELEMENT *index_element = find_element_extra_index_entry_sv(converter,
-                                                          *index_entry_sv);
-          /* it is important to check if the index entry was reassociated */
-          if (index_element && index_element->hv == element_hv)
-            return (index_element);
-        }
-    }
+  element_hv = (HV *) SvRV (element_sv);
 
   FETCH(type)
 
@@ -1467,8 +1266,6 @@ find_element_from_sv (CONVERTER *converter, SV 
*element_sv,
   return 0;
 }
 
-#undef EXTRA
-
 #undef FETCH
 
 /* Not sure if it is generic or HTML specific */
@@ -1509,8 +1306,8 @@ element_converter_from_sv (SV *converter_in, SV 
*element_sv,
   output_units_descriptor
     = get_output_units_descriptor_converter_sv (converter_in);
 
-  return find_element_from_sv (*converter_out, element_sv,
-                               output_units_descriptor);
+  return html_find_element_from_sv (*converter_out, element_sv,
+                                    output_units_descriptor);
 }
 
 /* find from an index entry in index data */
@@ -1572,7 +1369,7 @@ find_node_target_info_nodedescription_sv (CONVERTER 
*converter,
                                        strlen ("element_node"), 0);
       if (element_node_sv)
         {
-          ELEMENT *node = find_element_from_sv (converter,
+          ELEMENT *node = html_find_element_from_sv (converter,
                                                 *element_node_sv, 0);
           if (node)
             {
diff --git a/tp/Texinfo/XS/convert/get_html_perl_info.h 
b/tp/Texinfo/XS/convert/get_html_perl_info.h
index f75889a223..10d41a9b75 100644
--- a/tp/Texinfo/XS/convert/get_html_perl_info.h
+++ b/tp/Texinfo/XS/convert/get_html_perl_info.h
@@ -23,8 +23,8 @@ void html_converter_initialize_sv (SV *converter_sv,
 
 void html_converter_prepare_output_sv (SV *converter_sv, CONVERTER *converter);
 
-ELEMENT *find_element_from_sv (CONVERTER *converter, SV *element_sv,
-                               int output_units_descriptor);
+ELEMENT *html_find_element_from_sv (CONVERTER *converter, SV *element_sv,
+                                    int output_units_descriptor);
 
 ELEMENT *element_converter_from_sv (SV *converter_in, SV *element_sv,
                        const char *warn_string, CONVERTER **converter_out);
diff --git a/tp/Texinfo/XS/main/get_perl_info.c 
b/tp/Texinfo/XS/main/get_perl_info.c
index ce7c3641e1..6727421db1 100644
--- a/tp/Texinfo/XS/main/get_perl_info.c
+++ b/tp/Texinfo/XS/main/get_perl_info.c
@@ -44,6 +44,7 @@ FIXME add an initialization of translations?
 #include "utils.h"
 #include "builtin_commands.h"
 #include "errors.h"
+#include "targets.h"
 #include "document.h"
 #include "output_unit.h"
 #include "convert_to_text.h"
@@ -1099,3 +1100,281 @@ html_get_direction_icons_sv (CONVERTER *converter,
     }
 }
 
+INDEX_ENTRY *
+find_sorted_index_names_index_entry_extra_index_entry_sv (
+                                       SORTED_INDEX_NAMES *sorted_index_names,
+                                       SV *extra_index_entry_sv)
+{
+  AV *extra_index_entry_av;
+  SV **index_name_sv;
+  char *index_name = 0;
+
+  dTHX;
+
+
+  extra_index_entry_av = (AV *) SvRV (extra_index_entry_sv);
+
+  index_name_sv = av_fetch (extra_index_entry_av, 0, 0);
+  if (index_name_sv)
+    {
+      index_name = SvPVutf8_nolen (*index_name_sv);
+    }
+
+  if (index_name)
+    {
+      SV **number_sv = av_fetch (extra_index_entry_av, 1, 0);
+      if (number_sv)
+        {
+          int entry_number = SvIV (*number_sv);
+          if (entry_number)
+            {
+              size_t index_nr
+                = index_number_index_by_name (sorted_index_names,
+                                              index_name);
+              return &sorted_index_names->list[index_nr -1].index
+                 ->index_entries[entry_number -1];
+            }
+        }
+    }
+  return 0;
+}
+
+INDEX_ENTRY *
+find_document_index_entry_extra_index_entry_sv (DOCUMENT *document,
+                                               SV *extra_index_entry_sv)
+{
+  AV *extra_index_entry_av;
+  SV **index_name_sv;
+  INDEX *idx = 0;
+
+  dTHX;
+
+  if (!document->index_names)
+    return 0;
+
+  extra_index_entry_av = (AV *) SvRV (extra_index_entry_sv);
+
+  index_name_sv = av_fetch (extra_index_entry_av, 0, 0);
+  if (index_name_sv)
+    {
+      char *index_name = SvPVutf8_nolen (*index_name_sv);
+      idx = indices_info_index_by_name (document->index_names,
+                                        index_name);
+    }
+
+  if (idx)
+    {
+      SV **number_sv = av_fetch (extra_index_entry_av, 1, 0);
+      if (number_sv)
+        {
+          int entry_number = SvIV (*number_sv);
+          if (entry_number)
+            return &idx->index_entries[entry_number -1];
+        }
+    }
+  return 0;
+}
+
+/* if there is a converter with sorted index names, use the
+   sorted index names, otherwise use the index information from
+   a document */
+ELEMENT *
+find_element_extra_index_entry_sv (DOCUMENT *document,
+                                   CONVERTER *converter,
+                                   SV *extra_index_entry_sv)
+{
+  INDEX_ENTRY *index_entry;
+  if (!converter || !converter->document->index_names)
+    {
+      if (document)
+        index_entry
+          = find_document_index_entry_extra_index_entry_sv (document,
+                                                 extra_index_entry_sv);
+      else
+        return 0;
+    }
+  else
+   index_entry = find_sorted_index_names_index_entry_extra_index_entry_sv (
+                    &converter->sorted_index_names, extra_index_entry_sv);
+
+  if (index_entry)
+    {
+      if (index_entry->entry_associated_element)
+        return index_entry->entry_associated_element;
+      else if (index_entry->entry_element)
+        return index_entry->entry_element;
+    }
+  return 0;
+}
+
+#define FETCH(key) key##_sv = hv_fetch (element_hv, #key, strlen(#key), 0);
+/* find C tree root element corresponding to perl tree element element_hv */
+ELEMENT *find_root_command (DOCUMENT *document, HV *element_hv,
+                            int output_units_descriptor)
+{
+  SV **associated_unit_sv;
+  ELEMENT *root;
+  size_t i;
+
+  dTHX;
+
+  if (output_units_descriptor)
+    {
+      FETCH(associated_unit)
+
+      if (associated_unit_sv)
+        {
+          /* find the associated output unit and then find the element
+             in unit contents */
+          HV *associated_unit_hv = (HV *) SvRV (*associated_unit_sv);
+          SV **unit_index_sv = hv_fetch (associated_unit_hv, "unit_index",
+                                         strlen ("unit_index"), 0);
+
+          if (unit_index_sv)
+            {
+              int unit_index = SvIV (*unit_index_sv);
+              const OUTPUT_UNIT_LIST *output_units
+               = retrieve_output_units (output_units_descriptor);
+
+              if (output_units && unit_index < output_units->number)
+                {
+                  OUTPUT_UNIT *output_unit = output_units->list[unit_index];
+                  size_t i;
+                  for (i = 0; i < output_unit->unit_contents.number; i++)
+                    {
+                      ELEMENT *content = output_unit->unit_contents.list[i];
+                      if (content->hv == element_hv)
+                        return content;
+                    }
+                }
+            }
+        }
+    }
+
+  /* if there are no output units go through the root element children */
+  root = document->tree;
+  for (i = 0; i < root->contents.number; i++)
+    {
+      ELEMENT *content = root->contents.list[i];
+      if (content->hv == element_hv)
+        return content;
+    }
+  return 0;
+}
+
+/* TODO nodedescription using the extra element_node and the
+ * node extra node_description? */
+
+/* find C Texinfo tree element based on element_sv perl tree element.
+   Both DOCUMENT_IN and CONVERTER are optional, but if there is no
+   document coming from one or the other, elements will not be found.
+   If a DOCUMENT_IN argument is given, the corresponding document is
+   used.  If there is no DOCUMENT_IN and there is a CONVERTER argument,
+   the CONVERTER document is used.
+   OUTPUT_UNIT_DESCRIPTOR is optional, it should allow to find sectioning
+   commands faster.
+   Only for global commands, commands with indices, and sectioning root
+   commands */
+ELEMENT *
+find_element_from_sv (CONVERTER *converter, DOCUMENT *document_in,
+                      SV *element_sv, int output_units_descriptor)
+{
+  enum command_id cmd = 0;
+  HV *element_hv;
+  SV **cmdname_sv;
+  SV **extra_sv;
+  DOCUMENT *document = document_in;
+
+  dTHX;
+
+  element_hv = (HV *) SvRV (element_sv);
+
+  FETCH(cmdname)
+
+  if (!document && converter && converter->document)
+    document = converter->document;
+
+  if (cmdname_sv && (output_units_descriptor || document))
+    {
+      char *cmdname = SvPVutf8_nolen (*cmdname_sv);
+      cmd = lookup_builtin_command (cmdname);
+
+      if (builtin_command_data[cmd].flags & CF_root
+          && cmd != CM_node)
+        {
+          ELEMENT *element = find_root_command (document,
+                                                element_hv,
+                                                output_units_descriptor);
+          if (element)
+            return element;
+        }
+    }
+
+  FETCH(extra)
+
+#define EXTRA(key) key##_sv = hv_fetch (extra_hv, #key, strlen(#key), 0);
+  if (extra_sv)
+    {
+      HV *extra_hv = (HV *) SvRV (*extra_sv);
+      SV **index_entry_sv;
+      SV **associated_index_entry_sv;
+
+      if (document)
+        {
+          SV **global_command_number_sv;
+          EXTRA(global_command_number)
+          if (global_command_number_sv)
+            {
+              int global_command_number = SvIV (*global_command_number_sv);
+              ELEMENT_LIST *global_cmd_list
+                = get_cmd_global_multi_command (
+                              document->global_commands, cmd);
+
+              if (global_command_number > 0
+                  && global_command_number - 1 < global_cmd_list->number)
+                return global_cmd_list->list[global_command_number - 1];
+            }
+        }
+
+      if (document && document->identifiers_target)
+        {
+          SV **normalized_sv;
+          EXTRA(normalized)
+          if (normalized_sv)
+            {
+              char *normalized = SvPVutf8_nolen (*normalized_sv);
+              ELEMENT *element_found
+                = find_identifier_target
+                      (document->identifiers_target, normalized);
+         /* check the element found in case of multiple defined identifier */
+              if (element_found && element_hv == element_found->hv)
+                return element_found;
+            }
+        }
+
+
+      EXTRA(associated_index_entry)
+      if (associated_index_entry_sv)
+        {
+          ELEMENT *index_element = find_element_extra_index_entry_sv (document,
+                                               converter,
+                                               *associated_index_entry_sv);
+          /* there should be no ambiguity, but we check nevertheless */
+          if (index_element && index_element->hv == element_hv)
+            return (index_element);
+        }
+
+      EXTRA(index_entry)
+      if (index_entry_sv)
+        {
+          ELEMENT *index_element = find_element_extra_index_entry_sv (document,
+                                                          converter,
+                                                          *index_entry_sv);
+          /* it is important to check if the index entry was reassociated */
+          if (index_element && index_element->hv == element_hv)
+            return (index_element);
+        }
+    }
+  return 0;
+}
+#undef FETCH
diff --git a/tp/Texinfo/XS/main/get_perl_info.h 
b/tp/Texinfo/XS/main/get_perl_info.h
index 31a38bc891..8276e43f27 100644
--- a/tp/Texinfo/XS/main/get_perl_info.h
+++ b/tp/Texinfo/XS/main/get_perl_info.h
@@ -53,4 +53,6 @@ void html_get_direction_icons_sv (CONVERTER *converter,
                              DIRECTION_ICON_LIST *direction_icons,
                              SV *icons_sv);
 
+ELEMENT *find_element_from_sv (CONVERTER *converter, DOCUMENT *document_in,
+                               SV *element_sv, int output_units_descriptor);
 #endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]