summaryrefslogtreecommitdiff
path: root/info/nodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'info/nodes.h')
-rw-r--r--info/nodes.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/info/nodes.h b/info/nodes.h
index 213dc3c..36fa741 100644
--- a/info/nodes.h
+++ b/info/nodes.h
@@ -1,7 +1,7 @@
/* nodes.h -- How we represent nodes internally.
- $Id: nodes.h,v 1.6 2007/07/01 21:20:31 karl Exp $
+ $Id: nodes.h 5337 2013-08-22 17:54:06Z karl $
- Copyright (C) 1993, 1997, 1998, 2002, 2004, 2007
+ Copyright 1993, 1997, 1998, 2002, 2004, 2007, 2011, 2012, 2013
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox. */
#ifndef NODES_H
#define NODES_H
@@ -41,6 +41,7 @@ typedef struct {
char *contents; /* Characters appearing in this node. */
long nodelen; /* The length of the CONTENTS member. */
unsigned long display_pos; /* Where to display at, if nonzero. */
+ long body_start; /* Offset of the actual node body */
int flags; /* See immediately below. */
} NODE;
@@ -88,7 +89,10 @@ typedef struct {
char *filename; /* The file where this node can be found. */
char *nodename; /* The node pointed to by this tag. */
long nodestart; /* The offset of the start of this node. */
- long nodelen; /* The length of this node. */
+ size_t nodelen; /* The length of this node. */
+ char *content_cache; /* Cache of the node contents; used if the
+ node contents must be preprocessed before
+ displaying it. */
} TAG;
/* The following structure is used to remember information about the contents
@@ -103,10 +107,10 @@ typedef struct {
char *fullpath; /* The full pathname of this info file. */
struct stat finfo; /* Information about this file. */
char *contents; /* The contents of this particular file. */
- long filesize; /* The number of bytes this file expands to. */
+ 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. */
- int tags_slots; /* Number of slots allocated for TAGS. */
+ size_t tags_slots; /* Number of slots allocated for TAGS. */
int flags; /* Various flags. Mimics of N_* flags. */
} FILE_BUFFER;
@@ -116,7 +120,7 @@ typedef struct {
extern FILE_BUFFER **info_loaded_files;
/* The number of slots currently allocated to INFO_LOADED_FILES. */
-extern int info_loaded_files_slots;
+extern size_t info_loaded_files_slots;
/* Locate the file named by FILENAME, and return the information structure
describing this file. The file may appear in our list of loaded files
@@ -133,8 +137,12 @@ extern FILE_BUFFER *info_load_file (char *filename);
/* Return a pointer to a NODE structure for the Info node (FILENAME)NODENAME.
FILENAME can be passed as NULL, in which case the filename of "dir" is used.
NODENAME can be passed as NULL, in which case the nodename of "Top" is used.
+
+ The FLAG argument (one of the PARSE_NODE_* constants) instructs how to
+ parse NODENAME.
+
If the node cannot be found, return a NULL pointer. */
-extern NODE *info_get_node (char *filename, char *nodename);
+extern NODE *info_get_node (char *filename, char *nodename, int flag);
/* Return a pointer to a NODE structure for the Info node NODENAME in
FILE_BUFFER. NODENAME can be passed as NULL, in which case the
@@ -153,4 +161,6 @@ extern char *info_recent_file_error;
/* Create a new, empty file buffer. */
extern FILE_BUFFER *make_file_buffer (void);
+void forget_info_file (char *filename);
+
#endif /* not NODES_H */