[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5628] dir node storage; scrolling fix
From: |
Gavin D. Smith |
Subject: |
[5628] dir node storage; scrolling fix |
Date: |
Sun, 01 Jun 2014 21:14:58 +0000 |
Revision: 5628
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5628
Author: gavin
Date: 2014-06-01 21:14:57 +0000 (Sun, 01 Jun 2014)
Log Message:
-----------
dir node storage; scrolling fix
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/dir.c
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-06-01 20:50:07 UTC (rev 5627)
+++ trunk/ChangeLog 2014-06-01 21:14:57 UTC (rev 5628)
@@ -6,6 +6,13 @@
(remember_window_and_node): Remove check for remembering the same
node twice.
+ (info_scroll_backward_page_only_set_window): Call the right function.
+
+ * info/dir.c (dir_buffer, create_dir_buffer): Removed.
+ (dir_node): New static variable.
+ (get_dir_node): Store dir node as a simple NODE variable, not in the
+ tags table of a FILE_BUFFER. Comment updated.
+
2014-06-01 Gavin Smith <address@hidden>
* info/window.h (WINDOW): Fields nodes, pagetops, points
Modified: trunk/info/dir.c
===================================================================
--- trunk/info/dir.c 2014-06-01 20:50:07 UTC (rev 5627)
+++ trunk/info/dir.c 2014-06-01 21:14:57 UTC (rev 5628)
@@ -36,52 +36,25 @@
"dir", "localdir", NULL
};
-FILE_BUFFER *dir_buffer = 0;
+static NODE *dir_node = 0;
-static void create_dir_buffer (void);
static NODE *build_dir_node (void);
-/* Return composite directory node. Return value should not be freed. */
+/* Return composite directory node. Return value should be freed by caller,
+ but none of its fields should be. */
NODE *
get_dir_node (void)
{
NODE *node;
- if (!dir_buffer)
- create_dir_buffer ();
+ if (!dir_node)
+ dir_node = build_dir_node ();
- if (!dir_buffer->tags || !dir_buffer->tags[0])
- {
- NODE *tag;
- int i = 0;
- tag = build_dir_node ();
- /* Create and save dir node. */
- add_pointer_to_array (tag, i,
- dir_buffer->tags,
- dir_buffer->tags_slots, 2);
- }
-
node = xmalloc (sizeof (NODE));
- *node = *dir_buffer->tags[0]; /* Only one entry in tags table. */
+ *node = *dir_node;
return node;
}
-static void
-create_dir_buffer (void)
-{
- dir_buffer = make_file_buffer ();
- dir_buffer->filename = xstrdup ("dir");
- dir_buffer->fullpath = xstrdup ("dir");
- dir_buffer->finfo.st_size = 0;
- dir_buffer->filesize = 0;
- dir_buffer->contents = NULL;
- dir_buffer->flags = (N_IsInternal | N_CannotGC);
-
- /* Initialize empty tags table. */
- dir_buffer->tags = xmalloc (sizeof (NODE *));
- dir_buffer->tags[0] = 0;
-}
-
static NODE *
build_dir_node (void)
{
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-06-01 20:50:07 UTC (rev 5627)
+++ trunk/info/session.c 2014-06-01 21:14:57 UTC (rev 5628)
@@ -1094,7 +1094,7 @@
DECLARE_INFO_COMMAND (info_scroll_backward_page_only_set_window,
_("Scroll backward in this window staying within node
and set default window size"))
{
- info_scroll_backward_page_only_set_window (window, count, key);
+ info_scroll_forward_page_only_set_window (window, -count, key);
}
/* Scroll the window forward by N lines. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5628] dir node storage; scrolling fix,
Gavin D. Smith <=