300 output =
lwalloc(maxlength + 4);
304 if (truncdirection == 0)
307 if (endpos - startpos < maxlength)
309 outstart = str + startpos;
310 strncat(output, outstart, endpos - startpos + 1);
317 outstart = str + endpos + 1 - maxlength + 3;
318 strncat(output,
"...", 3);
319 strncat(output, outstart, maxlength - 3);
324 strncat(output,
"...", 3);
330 if (truncdirection == 1)
333 if (endpos - startpos < maxlength)
335 outstart = str + startpos;
336 strncat(output, outstart, endpos - startpos + 1);
343 outstart = str + startpos;
344 strncat(output, outstart, maxlength - 3);
345 strncat(output,
"...", 3);
350 strncat(output,
"...", 3);
void * lwalloc(size_t size)