texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5558] output formatting; allocation


From: Gavin D. Smith
Subject: [5558] output formatting; allocation
Date: Sun, 11 May 2014 20:21:02 +0000

Revision: 5558
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5558
Author:   gavin
Date:     2014-05-11 20:21:00 +0000 (Sun, 11 May 2014)
Log Message:
-----------
output formatting; allocation

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/info-utils.c
    trunk/info/info.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-05-11 19:47:49 UTC (rev 5557)
+++ trunk/ChangeLog     2014-05-11 20:21:00 UTC (rev 5558)
@@ -1,3 +1,11 @@
+2014-05-11  Gavin Smith  <address@hidden>
+
+       * info/info-utils.c (scan_reference_target) <preprocess-nodes=On>:
+       Deal with newline following colon in cross-reference better.
+       (info_copy_references, copy_converting): Comments added.
+       * info/info.c (get_initial_file): Call info_copy_reference on
+       REFERENCE retrieved from dir.
+
 2014-05-11  Patrice Dumas  <address@hidden>
 
        * Texinfo/Parser.pm, Texinfo/Structuring.pm(warn_non_empty_parts),

Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c     2014-05-11 19:47:49 UTC (rev 5557)
+++ trunk/info/info-utils.c     2014-05-11 20:21:00 UTC (rev 5558)
@@ -330,6 +330,7 @@
 }
 
 /* Copy a list of references. */
+/* FIXME: Use info_concatenate_references with one null argument instead. */
 REFERENCE **
 info_copy_references (REFERENCE **ref1)
 {
@@ -844,7 +845,8 @@
          first convert the character to UTF-8, then look up a replacement
          string.  Note that mixing iconv_to_output and iconv_to_utf8
          on the same input may not work well if the input encoding
-         is stateful. */
+         is stateful.  We could deal with this by always converting to
+         UTF-8 first, then we could mix conversions on the UTF-8 stream. */
 
       /* We want to read exactly one character.  Do this by
          restricting size of output buffer. */
@@ -1209,6 +1211,7 @@
           char saved_char;
           char *nl_off;
 
+          copy_input_to_output (skip_whitespace_and_newlines (inptr));
           length = info_parse_node (inptr, PARSE_NODE_SKIP_NEWLINES);
 
           /* Check if there is a newline in the target. */
@@ -1219,7 +1222,7 @@
           
           if (info_parsed_filename)
             {
-              write_extra_bytes_to_output (" (", 2);
+              write_extra_bytes_to_output ("(", 1);
               write_extra_bytes_to_output (info_parsed_filename,
                 strlen (info_parsed_filename));
               write_extra_bytes_to_output (" manual)",

Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c   2014-05-11 19:47:49 UTC (rev 5557)
+++ trunk/info/info.c   2014-05-11 20:21:00 UTC (rev 5558)
@@ -201,7 +201,8 @@
               /* Store full path, so that we find the already loaded file in
                  info_find_file, and show the full path if --where is used. */
               entry->filename = initial_file;
-              add_pointer_to_array (entry, ref_index, ref_list, ref_slots, 2);
+              add_pointer_to_array (info_copy_reference (entry),
+                  ref_index, ref_list, ref_slots, 2);
             }
 
           if (!initial_file)
@@ -409,7 +410,7 @@
       add_pointer_to_array (new_ref, ref_index, ref_list, ref_slots, 2);
     }
 
-  return ref_list;
+  return;
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]