Revision: 557 Author: john.boyer@xxxxxxxxxxxxxxxxx Date: Tue Mar 27 13:15:38 2012 Log: Enhanced lou_allround to work with \xhhhh input http://code.google.com/p/liblouis/source/detail?r=557 Modified: /trunk/liblouis/compileTranslationTable.c /trunk/tools/lou_allround.c ======================================= --- /trunk/liblouis/compileTranslationTable.c Mon Mar 26 11:19:54 2012 +++ /trunk/liblouis/compileTranslationTable.c Tue Mar 27 13:15:38 2012 @@ -1554,7 +1554,7 @@ for (k = 0; k < result.length; k++) outString[k] = result.chars[k]; outString[k] = 0; - return 1; + return result.length; } static int ======================================= --- /trunk/tools/lou_allround.c Tue Jun 8 21:46:39 2010 +++ /trunk/tools/lou_allround.c Tue Mar 27 13:15:38 2012 @@ -25,7 +25,7 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include "config.h" #endif #include <stdio.h> @@ -316,8 +316,9 @@ inlen = getInput (); if (inlen == 0) break; - for (realInlen = 0; realInlen < inlen; realInlen++) - inbuf[realInlen] = inputBuffer[realInlen]; + if (!(realInlen = extParseChars (inputBuffer, inbuf))) + break; + inlen = realInlen; if (!lou_translateString (table, inbuf, &inlen, transbuf, &translen, NULL, NULL, 0)) break; @@ -359,14 +360,16 @@ outlen = outputSize; if (backOnly) { - for (translen = 0; translen < inlen; translen++) - transbuf[translen] = inputBuffer[translen]; + if (!(translen = extParseChars (inputBuffer, transbuf))) + break; + inlen = realInlen; } else { translen = outputSize; - for (realInlen = 0; realInlen < inlen; realInlen++) - inbuf[realInlen] = inputBuffer[realInlen]; + if (!(realInlen = extParseChars (inputBuffer, inbuf))) + break; + inlen = realInlen; if (!lou_translate (table, inbuf, &inlen, transbuf, &translen, emphasis, spacing, &outputPos[0], &inputPos[0], &cursorPos, For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com