diff -u -x 'Makefile*' -x '*.o' -x '*~' texinfo/trunk/info/indices.c merge-TAG-tree/trunk/info/indices.c --- texinfo/trunk/info/indices.c 2013-12-28 17:11:03.000000000 +0000 +++ merge-TAG-tree/trunk/info/indices.c 2014-01-30 13:54:28.000000000 +0000 @@ -127,7 +127,7 @@ /* Grovel the names of the nodes found in this file. */ if (file_buffer->tags) { - TAG *tag; + NODE *tag; for (i = 0; (tag = file_buffer->tags[i]); i++) { @@ -818,7 +818,7 @@ create_virtindex_node (FILE_BUFFER *file_buffer) { NODE *node; - TAG *tag = file_buffer->tags[0]; + NODE *tag = file_buffer->tags[0]; char *text = file_buffer->contents + tag->nodestart; text += skip_node_separator (text); diff -u -x 'Makefile*' -x '*.o' -x '*~' texinfo/trunk/info/man.c merge-TAG-tree/trunk/info/man.c --- texinfo/trunk/info/man.c 2013-12-28 17:11:03.000000000 +0000 +++ merge-TAG-tree/trunk/info/man.c 2014-01-30 13:54:28.000000000 +0000 @@ -386,7 +386,7 @@ manpage_node_of_file_buffer (FILE_BUFFER *file_buffer, char *pagename) { NODE *node = NULL; - TAG *tag = NULL; + NODE *tag = NULL; if (file_buffer->contents) { diff -u -x 'Makefile*' -x '*.o' -x '*~' texinfo/trunk/info/nodes.c merge-TAG-tree/trunk/info/nodes.c --- texinfo/trunk/info/nodes.c 2014-01-07 20:11:42.000000000 +0000 +++ merge-TAG-tree/trunk/info/nodes.c 2014-01-30 15:06:33.000000000 +0000 @@ -34,7 +34,7 @@ static void remember_info_file (FILE_BUFFER *file_buffer); static void free_file_buffer_tags (FILE_BUFFER *file_buffer); -static void free_info_tag (TAG *tag); +static void free_info_tag (NODE *tag); static void get_nodes_of_tags_table (FILE_BUFFER *file_buffer, SEARCH_BINDING *buffer_binding); static void get_nodes_of_info_file (FILE_BUFFER *file_buffer); @@ -510,7 +510,7 @@ get_nodes_of_info_file (file_buffer); } -/* Search through FILE_BUFFER->contents building an array of TAG *, +/* Search through FILE_BUFFER->contents building an array of NODE *, one entry per each node present in the file. Store the tags in FILE_BUFFER->tags, and the number of allocated slots in FILE_BUFFER->tags_slots. */ @@ -530,7 +530,7 @@ { int start, end; char *nodeline; - TAG *entry; + NODE *entry; int anchor = 0; /* Skip past the characters just found. */ @@ -563,7 +563,7 @@ /* Okay, we have isolated the node name, and we know where the node starts. Remember this information. */ - entry = xmalloc (sizeof (TAG)); + entry = xmalloc (sizeof (NODE)); entry->content_cache = NULL; entry->nodename = xmalloc (1 + (end - start)); strncpy (entry->nodename, nodeline + start, end - start); @@ -637,7 +637,7 @@ Do each line until we find one that doesn't contain a node name. */ while (search_forward ("\n", tmp_search, &position) == search_success) { - TAG *entry; + NODE *entry; char *nodedef; unsigned p; int anchor = 0; @@ -668,7 +668,7 @@ if (name_offset == -1) break; - entry = xmalloc (sizeof (TAG)); + entry = xmalloc (sizeof (NODE)); entry->content_cache = NULL; /* Find the beginning of the node definition. */ @@ -721,7 +721,7 @@ int i; SUBFILE **subfiles = NULL; size_t subfiles_index = 0, subfiles_slots = 0; - TAG *entry; + NODE *entry; /* First get the list of tags from the tags table. Then lookup the associated file in the indirect list for each tag, and update it. */ @@ -861,8 +861,7 @@ entry->nodestart -= subfiles[i - 1]->first_byte; entry->nodestart += header_length; } - - /* We have successfully built the tags table. Remember that it + /* We have successfully built the tags table. Remember that it was indirect. */ file_buffer->flags |= N_TagsIndirect; } @@ -881,16 +880,16 @@ /* Return the node that contains TAG in FILE_BUFFER, else (pathologically) NULL. Called from info_node_of_file_buffer_tags. */ static NODE * -find_node_of_anchor (FILE_BUFFER *file_buffer, TAG *tag) +find_node_of_anchor (FILE_BUFFER *file_buffer, NODE *tag) { int anchor_pos, node_pos; - TAG *node_tag; + NODE *node_tag; NODE *node; /* Look through the tag list for the anchor. */ for (anchor_pos = 0; file_buffer->tags[anchor_pos]; anchor_pos++) { - TAG *t = file_buffer->tags[anchor_pos]; + NODE *t = file_buffer->tags[anchor_pos]; if (t->nodestart == tag->nodestart) break; } @@ -951,7 +950,7 @@ static NODE * info_node_of_file_buffer_tags (FILE_BUFFER *file_buffer, char *nodename) { - TAG *tag; + NODE *tag; int i; /* If no tags at all (possibly a misformatted info file), quit. */ @@ -1161,7 +1160,7 @@ if (file_buffer->tags) { - TAG *tag; + NODE *tag; for (i = 0; (tag = file_buffer->tags[i]); i++) free_info_tag (tag); @@ -1183,7 +1182,7 @@ /* Free the data associated with TAG, as well as TAG itself. */ static void -free_info_tag (TAG *tag) +free_info_tag (NODE *tag) { free (tag->nodename); free (tag->content_cache); diff -u -x 'Makefile*' -x '*.o' -x '*~' texinfo/trunk/info/nodes.h merge-TAG-tree/trunk/info/nodes.h --- texinfo/trunk/info/nodes.h 2013-12-28 17:11:03.000000000 +0000 +++ merge-TAG-tree/trunk/info/nodes.h 2014-01-30 13:54:28.000000000 +0000 @@ -43,6 +43,11 @@ unsigned long display_pos; /* Where to display at, if nonzero. */ long body_start; /* Offset of the actual node body */ int flags; /* See immediately below. */ +/* Fields merged from TAG */ + long nodestart; /* The offset of the start of this node. */ + char *content_cache; /* Cache of the node contents; used if the + node contents must be preprocessed before + displaying it. */ } NODE; /* Defines that can appear in NODE->flags. All informative. */ @@ -78,6 +83,9 @@ #define INFO_FF '\014' #define INFO_TAGSEP '\177' +/*Disable typedef - use NODE instead */ +#if 0 + /* For each logical file that we have loaded, we keep a list of the names of the nodes that are found in that file. A pointer to a node in an info file is called a "tag". For split files, the tag pointer is @@ -94,6 +102,7 @@ node contents must be preprocessed before displaying it. */ } TAG; +#endif /* The following structure is used to remember information about the contents of Info files that we have loaded at least once before. The FINFO member @@ -109,7 +118,7 @@ char *contents; /* The contents of this particular file. */ size_t filesize; /* The number of bytes this file expands to. */ char **subfiles; /* If non-null, the list of subfiles. */ - TAG **tags; /* If non-null, the indirect tags table. */ + NODE **tags; /* If non-null, the indirect tags table. */ size_t tags_slots; /* Number of slots allocated for TAGS. */ int flags; /* Various flags. Mimics of N_* flags. */ } FILE_BUFFER; diff -u -x 'Makefile*' -x '*.o' -x '*~' texinfo/trunk/info/session.c merge-TAG-tree/trunk/info/session.c --- texinfo/trunk/info/session.c 2013-12-28 17:11:03.000000000 +0000 +++ merge-TAG-tree/trunk/info/session.c 2014-01-30 13:54:28.000000000 +0000 @@ -3979,7 +3979,7 @@ { register int current_tag = 0, number_of_tags; char *last_subfile; - TAG *tag; + NODE *tag; char *msg = NULL; /* Find number of tags and current tag. */