[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6749] disallow line breaks between double-width characters if line brea
From: |
Gavin D. Smith |
Subject: |
[6749] disallow line breaks between double-width characters if line breaks disallowed |
Date: |
Tue, 03 Nov 2015 12:06:50 +0000 |
Revision: 6749
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6749
Author: gavin
Date: 2015-11-03 12:06:49 +0000 (Tue, 03 Nov 2015)
Log Message:
-----------
disallow line breaks between double-width characters if line breaks disallowed
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/XSParagraph/xspara.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-11-03 11:51:41 UTC (rev 6748)
+++ trunk/ChangeLog 2015-11-03 12:06:49 UTC (rev 6749)
@@ -1,5 +1,13 @@
2015-11-03 Gavin Smith <address@hidden>
+ * tp/Texinfo/Convert/XSParagraph/xspara.c:
+ (xspara_add_text) <double-width character>: If protect_spaces is
+ on, accumulate double-width characters instead of sticking them
+ in the output right away.
+ (xspara__add_pending_word): Comment changed.
+
+2015-11-03 Gavin Smith <address@hidden>
+
* tp/Texinfo/Convert/Paragraph.pm: Use the correct symbol name
for the XS bootstrap function. Print the name of the loaded
library file if debug output is on, as well as the name of the
Modified: trunk/tp/Texinfo/Convert/XSParagraph/xspara.c
===================================================================
--- trunk/tp/Texinfo/Convert/XSParagraph/xspara.c 2015-11-03 11:51:41 UTC
(rev 6748)
+++ trunk/tp/Texinfo/Convert/XSParagraph/xspara.c 2015-11-03 12:06:49 UTC
(rev 6749)
@@ -422,8 +422,9 @@
return t.text;
}
-/* Append to RESULT pending space followed by pending word. Assume we don't
- need to wrap a line. Only add spaces without a word if ADD_SPACES. */
+/* Append to RESULT pending space followed by pending word, clearing them
+ afterwards. Assume we don't need to wrap a line. Only add spaces without
a
+ word if ADD_SPACES. */
void
xspara__add_pending_word (TEXT *result, int add_spaces)
{
@@ -939,11 +940,10 @@
/*************** Double width character. *********************/
if (width == 2)
{
-
state.last_letter = L'\0';
- /* It appears we allow a line break in between Chinese
characters
- even if there was no space between them, unlike single-width
+ /* We allow a line break in between Chinese characters even if
+ there was no space between them, unlike single-width
characters. */
/* Append wc to state.word. */
@@ -956,7 +956,10 @@
{
xspara__cut_line (&result);
}
- xspara__add_pending_word (&result, 0);
+ /* If protect_spaces is on, accumulate the characters so that
+ they can be pushed onto the next line if necessary. */
+ if (!state.protect_spaces)
+ xspara__add_pending_word (&result, 0);
state.end_sentence = -2;
}
/*************** Word character ******************************/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6749] disallow line breaks between double-width characters if line breaks disallowed,
Gavin D. Smith <=