[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5467] Fields added
From: |
Gavin D. Smith |
Subject: |
[5467] Fields added |
Date: |
Mon, 21 Apr 2014 19:18:55 +0000 |
Revision: 5467
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5467
Author: gavin
Date: 2014-04-21 19:18:53 +0000 (Mon, 21 Apr 2014)
Log Message:
-----------
Fields added
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/info-utils.h
trunk/info/nodes.c
trunk/info/nodes.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-04-21 17:32:26 UTC (rev 5466)
+++ trunk/ChangeLog 2014-04-21 19:18:53 UTC (rev 5467)
@@ -1,5 +1,15 @@
2014-04-21 Gavin Smith <address@hidden>
+ * nodes.h (NODE): New fields references, up, prev, next.
+ * info-utils.h, nodes.h (REFERENCE): New field 'type'. typedef
+ declaration moved.
+ * nodes.h (REFERENCE_XREF, REFERENCE_MENU_ITEM): New preprocessor
+ symbols.
+ * nodes.c (info_create_node): Initialize new fields of NODE.
+ (free_info_tag): Free references field if set.
+
+2014-04-21 Gavin Smith <address@hidden>
+
* info/nodes.c: (info_node_of_file_buffer_tags, info_node_of_tag):
Function split out.
(find_node_of_anchor): Function merged into info_node_of_tag. Don't
Modified: trunk/info/info-utils.h
===================================================================
--- trunk/info/info-utils.h 2014-04-21 17:32:26 UTC (rev 5466)
+++ trunk/info/info-utils.h 2014-04-21 19:18:53 UTC (rev 5467)
@@ -26,17 +26,6 @@
#include "window.h"
#include "search.h"
-/* Structure which describes a node reference, such as a menu entry or
- cross reference. Arrays of such references can be built by calling
- info_menus_of_node () or info_xrefs_of_node (). */
-typedef struct {
- char *label; /* User Label. */
- char *filename; /* File where this node can be found. */
- char *nodename; /* Name of the node. */
- int start, end; /* Offsets within the containing node of LABEL. */
- int line_number; /* Specific line number a menu item points to. */
-} REFERENCE;
-
/* When non-zero, various display and input functions handle ISO Latin
character sets correctly. */
extern int ISO_Latin_p;
Modified: trunk/info/nodes.c
===================================================================
--- trunk/info/nodes.c 2014-04-21 17:32:26 UTC (rev 5466)
+++ trunk/info/nodes.c 2014-04-21 19:18:53 UTC (rev 5467)
@@ -573,6 +573,7 @@
if (tag->flags & N_WasRewritten)
free (tag->contents);
+ if (tag->references) info_free_references (tag->references);
free (tag->nodename);
/* We don't free tag->filename, because that filename is part of the
@@ -902,6 +903,10 @@
n->display_pos = 0;
n->body_start = 0;
n->flags = 0;
+ n->references = 0;
+ n->up = 0;
+ n->prev = 0;
+ n->next = 0;
return n;
}
@@ -1260,7 +1265,7 @@
/* Don't search in the node for the xref text, it's not there. */
node->flags |= N_FromAnchor;
- }
+ }
}
if (!node)
Modified: trunk/info/nodes.h
===================================================================
--- trunk/info/nodes.h 2014-04-21 17:32:26 UTC (rev 5466)
+++ trunk/info/nodes.h 2014-04-21 19:18:53 UTC (rev 5467)
@@ -26,6 +26,22 @@
/* User code interface. */
+/* Structure which describes a node reference, such as a menu entry or
+ cross reference. Arrays of such references can be built by calling
+ info_menus_of_node () or info_xrefs_of_node (). */
+typedef struct {
+ char *label; /* User Label. */
+ char *filename; /* File where this node can be found. */
+ char *nodename; /* Name of the node. */
+ int start, end; /* Offsets within the containing node of LABEL. */
+ int line_number; /* Specific line number a menu item points to. */
+ int type; /* Whether reference is a xref or a menu item */
+} REFERENCE;
+
+/* Possible values of REFERENCE.type */
+#define REFERENCE_XREF 0
+#define REFERENCE_MENU_ITEM 1
+
/* Callers generally only want the node itself. This structure is used
to pass node information around. None of the information in this
structure should ever be directly freed. The structure itself can
@@ -46,7 +62,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. */
+ REFERENCE **references; /* Cross-references or menu items in node.
+ references == 0 implies uninitialized,
+ not empty */
long nodestart; /* The offset of the start of this node. */
+ char *up, *prev, *next; /* Names of nearby nodes. */
} NODE;
/* Defines that can appear in NODE->flags. All informative. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5467] Fields added,
Gavin D. Smith <=