rem: drawTChunkPart(Text *tPtr, Chunk *chunk, char *bufr, LocalMargins m, Paragraph *para, MyTextItems *items, short *nitems, short len, short start, short *Lmargin, XPoint *where, short draw, short spacepos)
add: static void drawTChunkPart(Text * tPtr, Chunk * chunk, char *bufr, LocalMargins m, Paragraph * para, MyTextItems * items, short *nitems, short len, short start, short *Lmargin, XPoint * where, short draw, short spacepos)
context: drawTChunkPart(Text *tPtr, Chunk *chunk, char *bufr, LocalMargins m,               Paragraph *para, MyTextItems *items, short *nitems, short len, short start,               short *Lmargin, XPoint *where, short draw, short spacepos){    short t_chunk_width, p_width, chars;    WMFont *font = (tPtr->monoFont)?tPtr->dFont:chunk->font;    /* if(doc->clickstart.yes && doc->clickstart.done) return; */    if(len==0) return;    p_width = m.right - WMIN(m.first, m.body);    if(p_width < MIN_DOC_WIDTH) // need WMRuler to take care of this...        return;    t_chunk_width = WMWidthOfString(font, bufr, len);    if((where->x + t_chunk_width <= p_width - *Lmargin)       || (tPtr->wrapping == wrNone)) {        /* if it can fit on rest of line, append to line */        chars = WMIN(len, MAX_WORD_LENGTH);        snprintf(items[*nitems].text, chars+1, "%s", bufr);        items[*nitems].chars = chars;        items[*nitems].x = *Lmargin+where->x;        items[*nitems].type = ctText;        items[*nitems].chunk = chunk;        items[*nitems].start = start;        if(*nitems >= MAX_CHUNX) {            chars  = WMIN(len, MAX_WORD_LENGTH);            snprintf(items[*nitems].text, chars+1, "%s", bufr);            items[*nitems].chars = chars;            items[*nitems].x = *Lmargin+where->x;            items[*nitems].type = ctText;            items[*nitems].chunk = chunk;            items[*nitems].start = start;            where->y += myDrawText(tPtr, para, items, *nitems+1,                                   p_width-*Lmargin, where->y, draw, spacepos);            if(tPtr->findingClickPoint && tPtr->foundClickPoint) return;            *nitems = 0;            where->x = 0;        } else {            (*nitems)++;            where->x += t_chunk_width;        }    } else if(t_chunk_width <= p_width - *Lmargin) {        /* it can fit on an entire line, flush and wrap it to a new line */        where->y += myDrawText(tPtr, para, items, *nitems,                               p_width-*Lmargin, where->y, draw, spacepos);        if(tPtr->findingClickPoint && tPtr->foundClickPoint) return;        *nitems = 0;        *Lmargin = WMAX(0, m.body - m.first);        where->x = 0;        drawTChunkPart(tPtr, chunk, bufr, m, para, items, nitems,                       len, start, Lmargin, where, draw, spacepos);    } else {        /* otherwise, chop line, call ourself recursively until it's all gone */        short J=0; /* bufr */        short j=0; /* local tmp buffer */        char tmp[len];        short diff = p_width - *Lmargin - where->x;        short _start=0;        if(diff < 20) {            where->y += myDrawText(tPtr, para,  items, *nitems,                                   p_width-*Lmargin, where->y, draw, spacepos);            if(tPtr->findingClickPoint && tPtr->foundClickPoint) return;            *nitems = 0;            *Lmargin = WMAX(0, m.body - m.first);            where->x = 0;            diff = p_width - *Lmargin - where->x;        }        for(J=0; J<len; J++) {            tmp[j] = bufr[J];            if(WMWidthOfString(font, tmp, j+1) > diff) {                drawTChunkPart(tPtr, chunk, tmp, m, para, items, nitems,                               j, start+_start, Lmargin, where, draw, spacepos);                _start = J;                J--; j=0;            } else j++;        }        /* and there's always that last chunk, get it too */        drawTChunkPart(tPtr, chunk, tmp, m, para, items, nitems,                       j, start+_start, Lmargin, where, draw, spacepos);    }}