+ if ((attr & (ATTR_ACTCURS | ATTR_PASCURS)) && cfg.cursor_type != 0) {
+ int startx, starty, dx, dy, length, i;
+ if (cfg.cursor_type == 1) {
+ startx = x; starty = y+descent;
+ dx = 1; dy = 0; length = fnt_width;
+ } else {
+ int xadjust = 0;
+ if (attr & ATTR_RIGHTCURS)
+ xadjust = fnt_width-1;
+ startx = x+xadjust; starty = y;
+ dx = 0; dy = 1; length = font_height;
+ }
+ if (attr & ATTR_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;
+ }
+ }
+ }