Revision: 1125 Author: mwhapples@xxxxxxxxx Date: Wed Mar 12 12:23:08 2014 UTCLog: 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Øjwey,¶k¢7¶ zÈ(¶m¶ÿÃn)b¶'¬²ír