x += offset_width; y += offset_height;
void do_cursor(Context ctx, int x, int y, char *text, int len,	       unsigned long attr, int lattr){    int fnt_width;    int char_width;    HDC hdc = ctx;    int ctype = cfg.cursor_type;    if ((attr & TATTR_ACTCURS) && (ctype == 0 || big_cursor)) {	if (((attr & CSET_MASK) | (unsigned char) *text) != UCSWIDE) {	    do_text(ctx, x, y, text, len, attr, lattr);	    return;	}	ctype = 2;	attr |= TATTR_RIGHTCURS;    }    fnt_width = char_width = font_width * (1 + (lattr != LATTR_NORM));    if (attr & ATTR_WIDE)	char_width *= 2;    x *= fnt_width;    y *= font_height;    if ((attr & TATTR_PASCURS) && (ctype == 0 || big_cursor)) {	POINT pts[5];	HPEN oldpen;	pts[0].x = pts[1].x = pts[4].x = x;	pts[2].x = pts[3].x = x + char_width - 1;	pts[0].y = pts[3].y = pts[4].y = y;	pts[1].y = pts[2].y = y + font_height - 1;	oldpen = SelectObject(hdc, CreatePen(PS_SOLID, 0, colours[23]));	Polyline(hdc, pts, 5);	oldpen = SelectObject(hdc, oldpen);	DeleteObject(oldpen);    } else if ((attr & (TATTR_ACTCURS | TATTR_PASCURS)) && ctype != 0) {	int startx, starty, dx, dy, length, i;	if (ctype == 1) {	    startx = x;	    starty = y + descent;	    dx = 1;	    dy = 0;	    length = char_width;	} else {	    int xadjust = 0;	    if (attr & TATTR_RIGHTCURS)		xadjust = char_width - 1;	    startx = x + xadjust;	    starty = y;	    dx = 0;	    dy = 1;	    length = font_height;	}	if (attr & TATTR_ACTCURS) {	    HPEN oldpen;	    oldpen =		SelectObject(hdc, CreatePen(PS_SOLID, 0, colours[23]));	    MoveToEx(hdc, startx, starty, NULL);	    LineTo(hdc, startx + dx * length, starty + dy * length);	    oldpen = SelectObject(hdc, oldpen);	    DeleteObject(oldpen);	} else {	    for (i = 0; i < length; i++) {		if (i % 2 == 0) {		    SetPixel(hdc, startx, starty, colours[23]);		}		startx += dx;		starty += dy;	    }	}    }}