[liblouis-liblouisxml] [liblouis] r1125 committed - Fix liblouis to prevent removing \xffff from between largesign rules. ...

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 12 Mar 2014 12:23:20 +0000

Revision: 1125
Author:   mwhapples@xxxxxxxxx
Date:     Wed Mar 12 12:23:08 2014 UTC
Log: Fix liblouis to prevent removing \xffff from between largesign rules. Also strips additional whitespace in this case.

http://code.google.com/p/liblouis/source/detail?r=1125

Modified:
 /trunk/NEWS
 /trunk/liblouis/lou_translateString.c

=======================================
--- /trunk/NEWS Fri Mar  7 13:06:32 2014 UTC
+++ /trunk/NEWS Wed Mar 12 12:23:08 2014 UTC
@@ -1,6 +1,10 @@
 liblouis NEWS -- history of user-visible changes.      -*- org -*-

 * Noteworthy changes in release 2.5.5 (2014-??-??)
+** Bug fixes
+- Fixed bug to prevent removal of \xffff between largesign rules. This
+  solves a LibLouisUTDML bug where \xffff is used as a segment delimiter.
+
 ** Braille table improvements
 - Fix for Norwegian where letsign is affecting some extra characters
   thanks to Lars Bjørndal
=======================================
--- /trunk/liblouis/lou_translateString.c       Mon Jan  6 13:37:00 2014 UTC
+++ /trunk/liblouis/lou_translateString.c       Wed Mar 12 12:23:08 2014 UTC
@@ -1878,8 +1878,22 @@
          break;
        case CTO_LargeSign:
          if (prevTransOpcode == CTO_LargeSign)
-           if (dest > 0 && checkAttr (currentOutput[dest - 1], CTC_Space, 1))
+          {
+            int hasEndSegment = 0;
+           while (dest > 0 && checkAttr (currentOutput[dest - 1], CTC_Space, 
1))
+            {
+              if (currentOutput[dest - 1] == 0xffff)
+              {
+                hasEndSegment = 1;
+              }
              dest--;
+            }
+            if (hasEndSegment != 0)
+            {
+              currentOutput[dest] = 0xffff;
+              dest++;
+            }
+          }
          break;
        case CTO_DecPoint:
          if (table->numberSign)
ŠÚuë®*mŠ‰è~Ø^²‡íÁªÞ¶‡hÂyhiØ­jweŠy,¶Šk¢7œ¶– zÈ(¶ˆm¶ŸÿÃn)b¶'¬²‡ír‰

Other related posts:

  • » [liblouis-liblouisxml] [liblouis] r1125 committed - Fix liblouis to prevent removing \xffff from between largesign rules. ... - liblouis