texinfo-commits
[Top][All Lists]
Advanced

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

[8395] parsetexi update


From: gavinsmith0123
Subject: [8395] parsetexi update
Date: Wed, 24 Oct 2018 13:19:33 -0400 (EDT)

Revision: 8395
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8395
Author:   gavin
Date:     2018-10-24 13:19:33 -0400 (Wed, 24 Oct 2018)
Log Message:
-----------
parsetexi update

Modified Paths:
--------------
    trunk/tp/Texinfo/XS/parsetexi/handle_commands.c
    trunk/tp/Texinfo/XS/parsetexi/input.c
    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-24 15:45:59 UTC 
(rev 8394)
+++ trunk/tp/Texinfo/XS/parsetexi/handle_commands.c     2018-10-24 17:19:33 UTC 
(rev 8395)
@@ -441,7 +441,7 @@
           /* Now manufacture the parse tree for the equivalent
              command and add it to the tree. */
 
-          destroy_element (args);
+          destroy_element_and_children (args);
           args = new_element (ET_NONE);
           e = new_element (ET_NONE);
           text_append (&e->text, arg);
@@ -489,13 +489,7 @@
           if (args->contents.number > 0 && arg_spec != LINE_skipline)
             add_extra_misc_args (misc, "misc_args", args);
           else
-            {
-              for (i = 0; i < args->contents.number; i++)
-                {
-                  destroy_element (args->contents.list[i]);
-                }
-              destroy_element (args);
-            }
+            destroy_element_and_children (args);
         }
 
       if (cmd == CM_raisesections)

Modified: trunk/tp/Texinfo/XS/parsetexi/input.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/input.c       2018-10-24 15:45:59 UTC (rev 
8394)
+++ trunk/tp/Texinfo/XS/parsetexi/input.c       2018-10-24 17:19:33 UTC (rev 
8395)
@@ -1,5 +1,4 @@
-/* Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
-   Free Software Foundation, Inc.
+/* Copyright 2010-2018 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -255,6 +254,10 @@
   return 0;
 }
 
+/* Check for a #line directive.
+   FIXME: Really shouldn't have to be checking whether we are inside
+   @verb etc. all the way down in here.  Then we could avoid passing
+   CURRENT as an argument. */
 static int
 check_line_directive (char *line, ELEMENT *current, LINE_NR *line_nr)
 {

Modified: trunk/tp/Texinfo/XS/parsetexi/separator.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/separator.c   2018-10-24 15:45:59 UTC (rev 
8394)
+++ trunk/tp/Texinfo/XS/parsetexi/separator.c   2018-10-24 17:19:33 UTC (rev 
8395)
@@ -705,6 +705,7 @@
          scan forward to the closing brace. */
       if (!expandp)
         {
+          static char *alloc_line;
           ELEMENT *e;
           int brace_count = 1;
           e = new_element (ET_elided);
@@ -721,10 +722,11 @@
                   brace_count--;
                   break;
                 default:
-                  line = next_text (current);
+                  free (alloc_line);
+                  alloc_line = line = next_text (current);
                   if (!line)
                     {
-                      /* ERROR - unbalanced brace */
+                      /* FIXME: ERROR - unbalanced brace */
                     }
                   continue;
                 }




reply via email to

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