hires_color(colors[focus]);  h = y1 + window->h;  for(i = y1; i < h; ++i) { if(i >= clipy1 && i < clipy2) { hires_cclearxy(x1, i, window->w); } }
ctk_draw_window(register struct ctk_window *window,		unsigned char focus,		unsigned char clipy1, unsigned char clipy2){  register struct ctk_widget *w;    /*  if(clipy1 >= clipy2) {    return;    }*/      x = window->x;  y = window->y + 1;  ++clipy2;    if(clipy2 < y) {    return;  }      x1 = x + 1;  y1 = y + 1;  x2 = x1 + window->w;  y2 = y1 + window->h;  hires_color(colors[focus]);    h = y1 + window->h;  /* Clear window contents. */  for(i = y1; i < h; ++i) {    if(i >= clipy1 && i < clipy2) {      hires_cclearxy(x1, i, window->w);    }  }  hires_color(colors[focus+1]);  hires_gotoxy(x, y);  ctk_blueround_windowparams.w = window->w;  ctk_blueround_windowparams.h = window->h;  if(clipy1 < y) {    ctk_blueround_windowparams.clipy1 = 0;  } else {    ctk_blueround_windowparams.clipy1 = clipy1 - y;  }  ctk_blueround_windowparams.clipy2 = clipy2 - y;  ctk_blueround_windowparams.color1 = colors[focus+1];  ctk_blueround_windowparams.color2 = colors[focus];  ctk_blueround_windowparams.title = window->title;  ctk_blueround_windowparams.titlelen = window->titlelen;  ctk_blueround_draw_windowborders();  #if 0  /* Draw window frame. */    if(y >= clipy1) {    windowulcorner(x, y);    windowupperborder(x + 3 + strlen(window->title),		      y, window->w - 5 - strlen(window->title));    windowurcorner(x + window->w + 1, y);    hires_gotoxy(x + 1, y);    hires_color(colors[focus]);    ctk_blueround_cputc(' ');    ctk_blueround_cputsn(window->title, window->titlelen);    ctk_blueround_cputc(' ');  }  h = window->h;    if(clipy1 > y1) {    if(clipy1 - y1 < h) {      h = clipy1 - y1;      y1 = clipy1;    } else {      h = 0;    }  }  if(y1 + h >= clipy2) {    if(y1 >= clipy2) {      h = 0;    } else {      h = clipy2 - y1;    }  }  if(h == 0) {    return;  }    hires_color(colors[focus+1]);    windowsideborder(x, y1, h+1, 0xc0);  hires_color(colors[focus]);  windowsideborder(x2, y+1, h, 0x0b);  if(y + window->h >= clipy1 &&     y + window->h < clipy2) {    windowlowerborder(x1, y2, window->w);  }#endif /* 0 */    focus = focus & CTK_FOCUS_WINDOW;    /* Draw inactive widgets. */  for(w = window->inactive; w != NULL; w = w->next) {    draw_widget(w, x1, y1,		clipy1, clipy2,		focus);  }    /* Draw active widgets. */  for(w = window->active; w != NULL; w = w->next) {      wfocus = focus;    if(w == window->focused) {      wfocus |= CTK_FOCUS_WIDGET;    }    draw_widget(w, x1, y1,		clipy1, clipy2,		wfocus);  }}