texinfo-commits
[Top][All Lists]
Advanced

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

[8303] parsetexi register_global_command


From: gavinsmith0123
Subject: [8303] parsetexi register_global_command
Date: Wed, 17 Oct 2018 07:15:13 -0400 (EDT)

Revision: 8303
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8303
Author:   gavin
Date:     2018-10-17 07:15:13 -0400 (Wed, 17 Oct 2018)
Log Message:
-----------
parsetexi register_global_command

Modified Paths:
--------------
    trunk/tp/Texinfo/XS/parsetexi/handle_commands.c
    trunk/tp/Texinfo/XS/parsetexi/parser.c
    trunk/tp/Texinfo/XS/parsetexi/parser.h
    trunk/tp/Texinfo/XS/parsetexi/separator.c

Modified: trunk/tp/Texinfo/XS/parsetexi/handle_commands.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/handle_commands.c     2018-10-17 11:07:09 UTC 
(rev 8302)
+++ trunk/tp/Texinfo/XS/parsetexi/handle_commands.c     2018-10-17 11:15:13 UTC 
(rev 8303)
@@ -155,7 +155,7 @@
           add_to_element_contents (current, misc);
           if (only_in_headings)
             add_extra_integer (misc, "invalid_nesting", 1);
-          register_global_command (cmd, misc);
+          register_global_command (misc);
         }
       mark_and_warn_invalid (cmd, invalid_parent, misc);
       if (close_preformatted_command(cmd))
@@ -303,7 +303,7 @@
         }
 
       mark_and_warn_invalid (cmd, invalid_parent, misc);
-      register_global_command (cmd, misc); // 4423
+      register_global_command (misc); // 4423
 
       if (arg_spec != MISC_special || !has_comment)
         current = end_line (current);
@@ -670,7 +670,7 @@
   mark_and_warn_invalid (cmd, invalid_parent, misc);
 
   if (misc)
-    register_global_command (cmd, misc);
+    register_global_command (misc);
   if (cmd == CM_dircategory)
     add_to_contents_as_array (&global_info.dircategory_direntry, misc);
 
@@ -1031,7 +1031,7 @@
         } /* 4827 */
       block->line_nr = line_nr;
       mark_and_warn_invalid (cmd, invalid_parent, block);
-      register_global_command (cmd, block);
+      register_global_command (block);
       start_empty_line_after_command (current, &line, block);
     }
 

Modified: trunk/tp/Texinfo/XS/parsetexi/parser.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/parser.c      2018-10-17 11:07:09 UTC (rev 
8302)
+++ trunk/tp/Texinfo/XS/parsetexi/parser.c      2018-10-17 11:15:13 UTC (rev 
8303)
@@ -124,11 +124,12 @@
 }
 
 // 1056
-/* Record the information from a command of global effect.
-   TODO: Could we scrap the first argument and use CURRENT->cmd? */
+/* Record the information from a command of global effect. */
 int
-register_global_command (enum command_id cmd, ELEMENT *current)
+register_global_command (ELEMENT *current)
 {
+  enum command_id cmd = current->cmd;
+
   if (command_data(cmd).flags & CF_global)
     {
       if (!current->line_nr.line_nr)

Modified: trunk/tp/Texinfo/XS/parsetexi/parser.h
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/parser.h      2018-10-17 11:07:09 UTC (rev 
8302)
+++ trunk/tp/Texinfo/XS/parsetexi/parser.h      2018-10-17 11:15:13 UTC (rev 
8303)
@@ -86,7 +86,7 @@
 enum kbd_enum {kbd_none, kbd_code, kbd_example, kbd_distinct };
 extern enum kbd_enum global_kbdinputstyle;
 
-int register_global_command (enum command_id cmd, ELEMENT *current);
+int register_global_command (ELEMENT *current);
 void wipe_global_info (void);
 
 #include "macro.h"

Modified: trunk/tp/Texinfo/XS/parsetexi/separator.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/separator.c   2018-10-17 11:07:09 UTC (rev 
8302)
+++ trunk/tp/Texinfo/XS/parsetexi/separator.c   2018-10-17 11:15:13 UTC (rev 
8303)
@@ -502,7 +502,7 @@
                 }
             }
         }
-      register_global_command (current->parent->cmd, current->parent);
+      register_global_command (current->parent);
 
       // 5190
       if (current->parent->cmd == CM_anchor
@@ -547,7 +547,7 @@
           debug ("CLOSING(context command)");
           closed_command = current->parent->cmd;
 
-          register_global_command (current->parent->cmd, current->parent);
+          register_global_command (current->parent);
           // 5220
           current = current->parent->parent;
           if (close_preformatted_command(closed_command))




reply via email to

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