[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5888] disable call to convert_eols
From: |
Gavin D. Smith |
Subject: |
[5888] disable call to convert_eols |
Date: |
Fri, 24 Oct 2014 13:37:14 +0000 |
Revision: 5888
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5888
Author: gavin
Date: 2014-10-24 13:37:12 +0000 (Fri, 24 Oct 2014)
Log Message:
-----------
disable call to convert_eols
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/Makefile.am
trunk/info/filesys.c
trunk/info/info-utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-10-23 23:38:12 UTC (rev 5887)
+++ trunk/ChangeLog 2014-10-24 13:37:12 UTC (rev 5888)
@@ -1,3 +1,11 @@
+2014-10-24 Gavin Smith <address@hidden>
+
+ * info/filesys.c (filesys_read_info_file): Disable call to
+ convert_eols.
+ * info/info-utils.c (printed_representation): Make '\r' bytes
+ followed by a '\n' invisible.
+ * info/Makefile.am: t/cr-tag-table.sh removed from XFAIL_TESTS.
+
2014-10-22 Gavin Smith <address@hidden>
* info/info-utils.c (forward_to_info_syntax): New function.
Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am 2014-10-23 23:38:12 UTC (rev 5887)
+++ trunk/info/Makefile.am 2014-10-24 13:37:12 UTC (rev 5888)
@@ -146,7 +146,6 @@
t/help.sh
XFAIL_TESTS = \
- t/cr-tag-table.sh \
t/quoted-label-as-target.sh \
t/quoted-target.sh \
t/quoted-label-and-target.sh \
Modified: trunk/info/filesys.c
===================================================================
--- trunk/info/filesys.c 2014-10-23 23:38:12 UTC (rev 5887)
+++ trunk/info/filesys.c 2014-10-24 13:37:12 UTC (rev 5888)
@@ -358,6 +358,9 @@
close (descriptor);
}
+ /* EOL conversion is disabled because it makes the tag table for a file
+ incorrect. See the test in info/t/cr-tag-table.sh. */
+#if 0
/* Convert any DOS-style CRLF EOLs into Unix-style NL.
Seems like a good idea to have even on Unix, in case the Info
files are coming from some Windows system across a network. */
@@ -367,7 +370,9 @@
want to waste storage. */
contents = xrealloc (contents, 1 + fsize);
contents[fsize] = '\0';
+#endif
*filesize = fsize;
+
return contents;
}
Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c 2014-10-23 23:38:12 UTC (rev 5887)
+++ trunk/info/info-utils.c 2014-10-24 13:37:12 UTC (rev 5888)
@@ -512,8 +512,16 @@
}
else if (cur_len == 1)
{
- if (*cur_ptr == '\r' || *cur_ptr == '\n')
+ if (*cur_ptr == '\n' || *cur_ptr == '\r')
{
+ /* If this is a CRLF line ending, ignore this character. */
+ if (*cur_ptr == '\r' && cur_ptr[1] == '\n')
+ {
+ *pchars = 0;
+ *pbytes = 0;
+ return cur_ptr;
+ }
+
*pchars = 1;
*pbytes = cur_len;
*delim = *cur_ptr;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5888] disable call to convert_eols,
Gavin D. Smith <=