rem: if (column < bPtr->usedColumnCount && bPtr->titles[column]) W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x, (bPtr->titleHeight-WMFontHeight(scr->boldFont))/2, bPtr->columnSize.width, WACenter, W_GC(scr->white), False, bPtr->titles[column], strlen(bPtr->titles[column]));
add: if (column < bPtr->usedColumnCount && bPtr->titles[column]) { int titleLen = strlen(bPtr->titles[column]); int widthC = bPtr->columnSize.width-8;  if (WMWidthOfString(scr->boldFont, bPtr->titles[column], titleLen) > widthC) { char *titleBuf = createTruncatedString(scr->boldFont, bPtr->titles[column], &titleLen, widthC); W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x, (bPtr->titleHeight-WMFontHeight(scr->boldFont))/2, bPtr->columnSize.width, WACenter, W_GC(scr->white), False, titleBuf, titleLen); free (titleBuf); } else { W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x, (bPtr->titleHeight-WMFontHeight(scr->boldFont))/2, bPtr->columnSize.width, WACenter, W_GC(scr->white), False, bPtr->titles[column], titleLen); } }
context: drawTitleOfColumn(WMBrowser *bPtr, int column){    WMScreen *scr = bPtr->view->screen;    int x;        x=(column-bPtr->firstVisibleColumn)*(bPtr->columnSize.width+COLUMN_SPACING);    XFillRectangle(scr->display, bPtr->view->window, W_GC(scr->darkGray), x, 0,		   bPtr->columnSize.width, bPtr->titleHeight);    W_DrawRelief(scr, bPtr->view->window, x, 0,		 bPtr->columnSize.width, bPtr->titleHeight, WRSunken);    if (column < bPtr->usedColumnCount && bPtr->titles[column])	W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x, 		    (bPtr->titleHeight-WMFontHeight(scr->boldFont))/2,		    bPtr->columnSize.width, WACenter, W_GC(scr->white),		    False, bPtr->titles[column], strlen(bPtr->titles[column]));}