eitan, It can happen that the output buffer is not large enough to hold the translation of the entire input buffer. If this happens, inlen is set to the number of characters actually translated. As you know, liblouis is based on the translation module in brltty. When brltty calls it, it passes the line length of the braille display in outlen. The function translates as many whole words as will fit on a line (or as many characters if the "word" is longer than the line). It then sets *inlen to the number of characters in the input buffer actually used. Brljty then calls the function again starting from this point. John On Mon, Mar 03, 2008 at 01:50:44PM -0800, Eitan Isaacson wrote: > Hi, > > I asked John this question before, but I didn't understand his answer, > so here it is again. *smile* > > When calling translate() or translateString() in liblouis the outlen > variable's reference is passed, and it is re-assigned to the newly > translated string's length. inlen also seems to be modified, but I am > not sure what it's new value means, or how it is useful. Shouldn't inlen > remain equal to the length of the input buffer? > > Cheers, > Eitan. > > For a description of the software and to download it go to > http://www.jjb-software.com -- John J. boyer; President, Chief Software Developer JJB Software, Inc. http://www.jjb-software.com Madison, WI USA Developing software for people with disabilities For a description of the software and to download it go to http://www.jjb-software.com