58
58
char *typeform, char *spacing, int *outputPos,
59
59
int *inputPos, int *cursorPos, int modex)
61
return trace_translate (tableList, inbufx, inlen, outbuf, outlen,
62
typeform, spacing, outputPos, inputPos, cursorPos,
67
trace_translate (const char *tableList, const widechar * inbufx,
68
int *inlen, widechar * outbuf, int *outlen,
69
char *typeform, char *spacing, int *outputPos,
70
int *inputPos, int *cursorPos,
71
const TranslationTableRule ** rules, int *rulesLen, int modex)
63
75
if (tableList == NULL || inbufx == NULL || inlen == NULL || outbuf ==
239
262
if (cursorPos != NULL)
240
263
*cursorPos = cursorPosition;
264
if (rulesLen != NULL)
265
*rulesLen = appliedRulesCount;
241
266
return goodTrans;
270
lou_translatePrehyphenated (const char *tableList,
271
const widechar * inbufx, int *inlen,
272
widechar * outbuf, int *outlen,
273
char *typeform, char *spacing,
274
int *outputPos, int *inputPos, int *cursorPos,
275
char *inputHyphens, char *outputHyphens,
279
int *alloc_inputPos = NULL;
280
if (inputHyphens != NULL)
282
if (outputHyphens == NULL)
284
if (inputPos == NULL)
286
alloc_inputPos = malloc (*outlen * sizeof (int));
287
inputPos = alloc_inputPos;
290
if (lou_translate (tableList, inbufx, inlen, outbuf, outlen, typeform,
291
spacing, outputPos, inputPos, cursorPos, modex))
293
if (inputHyphens != NULL)
297
for (outpos = 0; outpos < *outlen; outpos++)
299
int new_inpos = inputPos[outpos];
300
if (new_inpos < inpos)
305
if (new_inpos > inpos)
306
outputHyphens[outpos] = inputHyphens[new_inpos];
308
outputHyphens[outpos] = '0';
313
if (alloc_inputPos != NULL)
314
free (alloc_inputPos);
244
318
static TranslationTableOpcode indicOpcode;
245
319
static const TranslationTableRule *indicRule;
246
320
static int dontContract = 0;
630
704
for (k = 0; k < table->lenBeginCaps; k++)
631
if (!checkAttr (currentInput[src + k], CTC_UpperCase, 0))
705
if (k >= srcmax - src ||
706
!checkAttr (currentInput[src + k], CTC_UpperCase, 0))
1063
1138
if (start >= srcmax)
1065
while (checkAttr (currentInput[start], CTC_Space, 0) && start < srcmax)
1140
while (start < srcmax && checkAttr (currentInput[start], CTC_Space, 0))
1067
1142
if (start == srcmax || (transOpcode == CTO_JoinableWord && (!checkAttr
1080
while (!checkAttr (currentInput[end], CTC_Space, 0) && end < srcmax)
1155
while (end < srcmax && !checkAttr (currentInput[end], CTC_Space, 0))
1082
1157
if ((mode & (compbrlAtCursor | compbrlLeftCursor)) && cursorPosition
1083
1158
>= start && cursorPosition < end)