[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5462] don't go back to dir
From: |
Gavin D. Smith |
Subject: |
[5462] don't go back to dir |
Date: |
Thu, 17 Apr 2014 18:30:58 +0000 |
Revision: 5462
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5462
Author: gavin
Date: 2014-04-17 18:30:57 +0000 (Thu, 17 Apr 2014)
Log Message:
-----------
don't go back to dir
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/info-utils.c
trunk/info/nodes.c
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-04-17 15:12:34 UTC (rev 5461)
+++ trunk/ChangeLog 2014-04-17 18:30:57 UTC (rev 5462)
@@ -1,5 +1,15 @@
2014-04-17 Gavin Smith <address@hidden>
+ * info/nodes.c (adjust_nodestart): Initialize variable.
+
+ * info/info-utils.c (info_parse_label): Skip whitespace before label.
+ * info/session.c (backward_move_node_structure): Check if next or up
+ is a dir file properly.
+ (forward_move_node_structure, backward_move_node_structure)
+ (last_node_p): Avoid assignments in conditions.
+
+2014-04-17 Gavin Smith <address@hidden>
+
* install-info/install-info.c:
(main) Only output a warning in --remove operation if dir file
not found, and exit successfully.
Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c 2014-04-17 15:12:34 UTC (rev 5461)
+++ trunk/info/info-utils.c 2014-04-17 18:30:57 UTC (rev 5462)
@@ -183,6 +183,8 @@
if (i == -1)
return 0;
+ i++;
+ i += skip_whitespace (nodeline + i);
length = skip_node_characters (nodeline + i, PARSE_NODE_DFLT);
store_in = xmalloc (length + 1);
memmove (store_in, nodeline + i, length);
Modified: trunk/info/nodes.c
===================================================================
--- trunk/info/nodes.c 2014-04-17 15:12:34 UTC (rev 5461)
+++ trunk/info/nodes.c 2014-04-17 18:30:57 UTC (rev 5462)
@@ -1153,7 +1153,7 @@
static int
adjust_nodestart (FILE_BUFFER *fb, NODE *node)
{
- long position;
+ long position = -1;
SEARCH_BINDING s;
/* Try the optimal case first. Who knows? This file may actually be
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-04-17 15:12:34 UTC (rev 5461)
+++ trunk/info/session.c 2014-04-17 18:30:57 UTC (rev 5462)
@@ -1135,7 +1135,9 @@
last_node_p (NODE *node)
{
char *spec;
- if (spec = info_next_label_of_node (node))
+
+ spec = info_next_label_of_node (node);
+ if (spec)
{
free (spec);
return 0;
@@ -1165,7 +1167,8 @@
return 1;
case IS_NextOnly:
- if (!(spec = info_next_label_of_node (window->node)))
+ spec = info_next_label_of_node (window->node);
+ if (!spec)
{
info_error (msg_no_pointer, _("Next"));
return 1;
@@ -1216,7 +1219,8 @@
/* Okay, this node does not contain a menu. If it contains a
"Next:" pointer, use that. */
- if (spec = info_next_label_of_node (window->node))
+ spec = info_next_label_of_node (window->node);
+ if (spec)
{
free (spec);
info_handle_pointer ("Next", window);
@@ -1239,7 +1243,8 @@
up_counter = 0;
while (!info_error_was_printed)
{
- if (spec = info_up_label_of_node (window->node))
+ spec = info_up_label_of_node (window->node);
+ if (spec)
{
free (spec);
info_handle_pointer ("Up", window);
@@ -1249,7 +1254,8 @@
up_counter++;
/* If no "Next" pointer, keep backing up. */
- if (!(spec = info_next_label_of_node (window->node)))
+ spec = info_next_label_of_node (window->node);
+ if (!spec)
{
continue;
}
@@ -1324,7 +1330,8 @@
return 1;
case IS_NextOnly:
- if (!(spec = info_prev_label_of_node (window->node)))
+ spec = info_prev_label_of_node (window->node);
+ if (!spec)
{
info_error ("%s", _("No `Prev' for this node."));
return 1;
@@ -1338,12 +1345,14 @@
case IS_Continuous:
spec = info_prev_label_of_node (window->node);
+ info_parse_node (spec, PARSE_NODE_DFLT);
- if (!spec || is_dir_name (spec))
+ if (!spec || is_dir_name (info_parsed_filename))
{
if (spec) free (spec);
spec = info_up_label_of_node (window->node);
- if (!spec || is_dir_name (spec))
+ info_parse_node (spec, PARSE_NODE_DFLT);
+ if (!spec || is_dir_name (info_parsed_filename))
{
if (spec) free (spec);
info_error ("%s",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5462] don't go back to dir,
Gavin D. Smith <=