texinfo-commits
[Top][All Lists]
Advanced

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

[7154] parsetexi update (multitables)


From: gavinsmith0123
Subject: [7154] parsetexi update (multitables)
Date: Sun, 8 May 2016 14:27:45 +0000 (UTC)

Revision: 7154
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7154
Author:   gavin
Date:     2016-05-08 14:27:45 +0000 (Sun, 08 May 2016)
Log Message:
-----------
parsetexi update (multitables)

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

Modified: trunk/tp/parsetexi/api.c
===================================================================
--- trunk/tp/parsetexi/api.c    2016-05-08 14:24:16 UTC (rev 7153)
+++ trunk/tp/parsetexi/api.c    2016-05-08 14:27:45 UTC (rev 7154)
@@ -57,7 +57,7 @@
 void
 parse_file (char *filename)
 {
-  debug_output = 0;
+  debug_output = 1;
   reset_parser ();
   parse_texi_file (filename);
 }
@@ -235,6 +235,9 @@
       || e->cmd == CM_image // why image?
       || e->cmd == CM_anchor
       || e->cmd == CM_macro
+      || e->cmd == CM_multitable
+      || e->cmd == CM_item
+      || e->cmd == CM_tab
       || e->type == ET_menu_entry_name
       || e->type == ET_brace_command_arg
       || e->cmd == CM_TeX

Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c       2016-05-08 14:24:16 UTC (rev 7153)
+++ trunk/tp/parsetexi/end_line.c       2016-05-08 14:27:45 UTC (rev 7154)
@@ -948,8 +948,11 @@
 
       {
       char *s; /* FIXME: could just use prototypes instead */
-      asprintf (&s, "%d", prototypes->contents.number);
+      int max_columns = prototypes->contents.number;
+      asprintf (&s, "%d", max_columns);
       add_extra_string (current->parent, "max_columns", s);
+      if (max_columns == 0)
+        command_warn (current->parent, "empty multitable");
       }
       add_extra_contents (current->parent, "prototypes", prototypes);
     }

Modified: trunk/tp/parsetexi/handle_commands.c
===================================================================
--- trunk/tp/parsetexi/handle_commands.c        2016-05-08 14:24:16 UTC (rev 
7153)
+++ trunk/tp/parsetexi/handle_commands.c        2016-05-08 14:27:45 UTC (rev 
7154)
@@ -327,12 +327,18 @@
                 }
               else
                 { /* 4480 */
-                  int max_columns = 99; // FIXME
+                  int max_columns = 0;
                   KEY_PAIR *prototypes;
 
                   prototypes = lookup_extra_key  (parent, "prototypes");
                   if (prototypes)
                     max_columns = prototypes->value->contents.number;
+                  else
+                    {
+                      prototypes = lookup_extra_key(parent, "columnfractions");
+                      if (prototypes)
+                        max_columns = prototypes->value->contents.number;
+                    }
 
                   if (max_columns == 0)
                     {

Modified: trunk/tp/parsetexi/parser.c
===================================================================
--- trunk/tp/parsetexi/parser.c 2016-05-08 14:24:16 UTC (rev 7153)
+++ trunk/tp/parsetexi/parser.c 2016-05-08 14:27:45 UTC (rev 7154)
@@ -425,6 +425,17 @@
                 }
             }
 
+          if (current)
+            {
+              k = lookup_extra_key (current, "spaces_after_command");
+              if (k && k->value == last_contents_child(current))
+                {
+                  k->key = "";
+                  k->value = 0;
+                  k->type = extra_deleted;
+                }
+            }
+
           e = pop_element_from_contents (current);
           e->parent = 0; e->parent_type = route_not_in_tree;
           destroy_element (e);




reply via email to

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