[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[8211] parsetexi update
From: |
gavinsmith0123 |
Subject: |
[8211] parsetexi update |
Date: |
Sun, 23 Sep 2018 06:40:28 -0400 (EDT) |
Revision: 8211
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8211
Author: gavin
Date: 2018-09-23 06:40:27 -0400 (Sun, 23 Sep 2018)
Log Message:
-----------
parsetexi update
Modified Paths:
--------------
trunk/tp/Texinfo/XS/parsetexi/end_line.c
Modified: trunk/tp/Texinfo/XS/parsetexi/end_line.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/end_line.c 2018-09-22 22:53:36 UTC (rev
8210)
+++ trunk/tp/Texinfo/XS/parsetexi/end_line.c 2018-09-23 10:40:27 UTC (rev
8211)
@@ -1097,34 +1097,45 @@
isolate_last_space (current);
}
- if (current->parent->cmd == CM_float) // 2943
+ current = current->parent; //2965
+ if (counter_value (&count_remaining_args, current) != -1)
+ counter_pop (&count_remaining_args);
+
+ /* Don't consider empty argument of block @-command as argument,
+ reparent them as contents. */
+ if (current->args.list[0]->contents.number > 0
+ && current->args.list[0]->contents.list[0]->type
+ == ET_empty_line_after_command)
{
- ELEMENT *f = current->parent;
+ ELEMENT *e = remove_from_contents (current->args.list[0], 0);
+ insert_into_contents (current, e, 0);
+ destroy_element (pop_element_from_args (current));
+ }
+
+ if (current->cmd == CM_float) // 2943
+ {
char *type = "";
- current->parent->line_nr = line_nr;
- if (current->parent->args.number > 0)
+ KEY_PAIR *k;
+ EXTRA_FLOAT_TYPE *eft;
+ current->line_nr = line_nr;
+ if (current->args.number >= 2)
{
- KEY_PAIR *k;
- EXTRA_FLOAT_TYPE *eft;
- if (current->parent->args.number > 1)
- {
- // 2950
- NODE_SPEC_EXTRA *float_label;
- float_label = parse_node_manual (args_child_by_index (f, 1));
- check_internal_node (float_label);
+ // 2950
+ NODE_SPEC_EXTRA *float_label;
+ float_label = parse_node_manual (args_child_by_index (current, 1));
+ check_internal_node (float_label);
- register_label (f, float_label->node_content);
- free_node_contents (float_label->manual_content);
- free (float_label);
- }
- parse_float_type (f);
- k = lookup_extra (f, "type");
- if (k)
- {
- eft = (EXTRA_FLOAT_TYPE *) k->value;
- type = eft->normalized;
- }
+ register_label (current, float_label->node_content);
+ free_node_contents (float_label->manual_content);
+ free (float_label);
}
+ parse_float_type (current);
+ k = lookup_extra (current, "type");
+ if (k)
+ {
+ eft = (EXTRA_FLOAT_TYPE *) k->value;
+ type = eft->normalized;
+ }
// add to global 'floats' array
if (floats_number == floats_space)
{
@@ -1132,25 +1143,11 @@
(floats_space += 5) * sizeof (FLOAT_RECORD));
}
floats_list[floats_number].type = type;
- floats_list[floats_number++].element = f;
+ floats_list[floats_number++].element = current;
if (current_section)
- add_extra_element (f, "float_section", current_section);
+ add_extra_element (current, "float_section", current_section);
}
- current = current->parent; //2965
- if (counter_value (&count_remaining_args, current) != -1)
- counter_pop (&count_remaining_args);
- /* Don't consider empty argument of block @-command as argument,
- reparent them as contents. */
- if (current->args.list[0]->contents.number > 0
- && current->args.list[0]->contents.list[0]->type
- == ET_empty_line_after_command)
- {
- ELEMENT *e = remove_from_contents (current->args.list[0], 0);
- insert_into_contents (current, e, 0);
- destroy_element (pop_element_from_args (current));
- }
-
if (command_flags(current) & CF_blockitem) // 2981
{
if (current->cmd == CM_enumerate)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [8211] parsetexi update,
gavinsmith0123 <=