Hi Christian, The problem with holes in outpos also occurs during forward translation, for example forward translating the string "Pride and Prejudice" using en-us-g2 gives outpos values of 1 2 3 4 5 6 7 7 7 8 12 -1 -1 13 14 15 16 17 18 I wonder if it would be better to fix these problems at their source rather than initializing outpos and then checking it's values after translation? Thanks Jonathan Sharp -----Original Message----- From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Christian Egli Sent: Thursday, 20 May 2010 8:54 p.m. To: liblouis-liblouisxml Subject: [liblouis-liblouisxml] House cleaning, i.e. pending patches Hi all I have some time on my hands the next few days to do some liblouis house cleaning, namely there are a number of pending patches that need to be either incorporated or dropped. 1. The patch from Volker Bijewitz to do with cursorCompbrlLeftOnly. We asked Volker for a test case but he never sent one. The patch itself looks very minor and harmless. Should I incorporate the patch or should I just forget it? 2. Major changes to the danish table from Daniel K. Gartmann. I haven't done a lou_checktable on it and it is hard for me to tell wether this is a good change. It appears that he mostly just moved stuff from the danish grade 1 table into the da.ctb table. Also I wonder if he knew the existing grade 1 table, since he mostly deleted all from it. As I don't speak danish nor danish braille this is hard for me to judge. Should I just commit? 3. Two patches coming from the issue tracker from timothy.ty.lee: One is a documentation patch which fixes a problem where > The "outpos" and "inpos" parameters for lou_translate() and > lou_backTranslate() are incorrectly described inside the > documentation. > > By inspecting the source code and checking values returned by those two > functions, it becomes evident that "outpos" should have a length of > "inlen", and "inpos" a length of "outlen", not the other way around. > > This mix-up in array length is also present in lou_around.c when dumping > inpos and outpos returned by lou_backTranslate(). I don't use the screen reader features so I can't tell if this is this really so? Should I apply this patch? 4. The other patch by timothy.ty.lee fixes a problem with backtranslation and uninitialized ouput positions. It first initializes the outputpos with -1 and in the end replaces -1 values with the previous position. Does this make sense? Again should I apply? Here's the description: > To reproduce the problem: > 1. Before calling lou_backTranslate(), fill outpos with -1's > 2. Back-translate ",numb} #c = ,,y6" using en-us-g2.ctb > > When you examine the values returned in outpos, it can be seen that some of > the -1 were not overwritten by the function. What should happen instead is > that outpos[0..inlen] should be set by lou_backTranslate(). > > This problem is present in the trunk, and affects all operating systems. > > The attached patch aganist trunk overcomes the problem by filling outpos[] > with -1's to mark array as uninitialized when lou_backTranslate() starts. > Before returning to caller, the function examines outpos[] and fills in > unused elements in the array. 5. Lastly there is my patch which increases the MAXSTRING to 512 instead of 256 to handle my problem with very long table lists. I tried to solve the problem by dynamically allocating the memory but got stuck halfway. John said once that we can "temporary" increase the value. Does that mean I can check my change in? Thanks Christian -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland For a description of the software and to download it go to http://www.jjb-software.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 5130 (20100519) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 5131 (20100520) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com For a description of the software and to download it go to http://www.jjb-software.com