texinfo-commits
[Top][All Lists]
Advanced

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

[7243] parsetexi update


From: gavinsmith0123
Subject: [7243] parsetexi update
Date: Tue, 5 Jul 2016 19:15:37 +0000 (UTC)

Revision: 7243
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7243
Author:   gavin
Date:     2016-07-05 19:15:37 +0000 (Tue, 05 Jul 2016)
Log Message:
-----------
parsetexi update

Modified Paths:
--------------
    trunk/tp/parsetexi/handle_commands.c
    trunk/tp/parsetexi/parser.c

Modified: trunk/tp/parsetexi/handle_commands.c
===================================================================
--- trunk/tp/parsetexi/handle_commands.c        2016-07-03 15:49:22 UTC (rev 
7242)
+++ trunk/tp/parsetexi/handle_commands.c        2016-07-05 19:15:37 UTC (rev 
7243)
@@ -179,7 +179,8 @@
 }
 
 /* Line 4289 */
-/* STATUS is set to 1 if we should get a new line after this. */
+/* STATUS is set to 1 if we should get a new line after this,
+   2 if we should stop processing completely. */
 ELEMENT *
 handle_misc_command (ELEMENT *current, char **line_inout,
                      enum command_id cmd, int *status,
@@ -316,7 +317,8 @@
       // 4429
       if (cmd == CM_bye)
         {
-          // last NEXT_LINE
+          *status = 2; /* Finish processing completely. */
+          goto funexit;
         }
 
       if (close_preformatted_command(cmd))

Modified: trunk/tp/parsetexi/parser.c
===================================================================
--- trunk/tp/parsetexi/parser.c 2016-07-03 15:49:22 UTC (rev 7242)
+++ trunk/tp/parsetexi/parser.c 2016-07-05 19:15:37 UTC (rev 7243)
@@ -701,6 +701,7 @@
 
 #define GET_A_NEW_LINE 0
 #define STILL_MORE_TO_PROCESS 1
+#define FINISHED_TOTALLY 2
 
 /* line 3725 */
 /* *LINEP is a pointer into the line being processed.  It is advanced past any
@@ -821,7 +822,7 @@
             goto superfluous_arg;
           p++;
           tmp = read_command_name (&p);
-          if (tmp && !strcmp (tmp, "c") && !strcmp (tmp, "comment"))
+          if (tmp && (!strcmp (tmp, "c") || !strcmp (tmp, "comment")))
             {
             }
           else if (0)
@@ -1505,6 +1506,11 @@
               retval = GET_A_NEW_LINE;
               goto funexit;
             }
+          else if (status == 2)
+            {
+              retval = FINISHED_TOTALLY;
+              goto funexit;
+            }
         }
 
       /* line 4632 */
@@ -1667,12 +1673,16 @@
          of line. */
       while (1)
         {
-          if (!process_remaining_on_line (&current, &line))
+          int status = process_remaining_on_line (&current, &line);
+          if (status == GET_A_NEW_LINE)
             break;
+          if (status == FINISHED_TOTALLY)
+            goto finished_totally;
           if (!line)
             break;
         }
     }
+finished_totally:
 
   /* Check for unclosed conditionals */
   while (conditional_number > 0)




reply via email to

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