Lines Matching refs:ip

65 void et_init(struct ite_softc *ip);
66 void et_cursor(struct ite_softc *ip, int flag);
67 void et_deinit(struct ite_softc *ip);
68 void et_putc(struct ite_softc *ip, int c, int dy, int dx, int mode);
69 void et_clear(struct ite_softc *ip, int sy, int sx, int h, int w);
70 void et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir);
108 et_init(struct ite_softc *ip) in et_init() argument
112 ip->priv = ip->grf->g_data; in et_init()
113 md = (struct grfettext_mode *) ip->priv; in et_init()
115 ip->cols = md->cols; in et_init()
116 ip->rows = md->rows; in et_init()
121 et_cursor(struct ite_softc *ip, int flag) in et_cursor() argument
123 volatile u_char *ba = ip->grf->g_regkva; in et_cursor()
129 flag = ip->curx + ip->cury * ip->cols; in et_cursor()
134 ip->cursorx = ip->curx; in et_cursor()
135 ip->cursory = ip->cury; in et_cursor()
148 et_deinit(struct ite_softc *ip) in et_deinit() argument
150 ip->flags &= ~ITE_INITED; in et_deinit()
155 et_putc(struct ite_softc *ip, int c, int dy, int dx, int mode) in et_putc() argument
157 volatile unsigned char *ba = ip->grf->g_regkva; in et_putc()
158 volatile unsigned char *fb = ip->grf->g_fbkva; in et_putc()
162 if (ip->flags & ITE_INGRF) in et_putc()
170 cp = fb + ((dy * ip->cols) + dx); in et_putc()
179 et_clear(struct ite_softc *ip, int sy, int sx, int h, int w) in et_clear() argument
186 volatile unsigned char *ba = ip->grf->g_regkva; in et_clear()
189 if (ip->flags & ITE_INGRF) in et_clear()
192 dst = (volatile unsigned char*)ip->grf->g_fbkva + (sy * ip->cols) + sx; in et_clear()
193 src = dst + (ip->rows*ip->cols); in et_clear()
204 et_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir) in et_scroll() argument
207 volatile unsigned char *ba = ip->grf->g_regkva; in et_scroll()
209 if (ip->flags & ITE_INGRF) in et_scroll()
212 fb = (volatile unsigned char*)ip->grf->g_fbkva + sy * ip->cols; in et_scroll()
217 etbcopy(fb, fb - (count * ip->cols), in et_scroll()
218 (ip->bottom_margin + 1 - sy) * ip->cols); in et_scroll()
221 etbcopy(fb, fb + (count * ip->cols), in et_scroll()
222 (ip->bottom_margin + 1 - (sy + count)) * ip->cols); in et_scroll()
225 etbcopy(fb+sx, fb+sx+count, ip->cols - (sx + count)); in et_scroll()
228 etbcopy(fb+sx, fb+sx-count, ip->cols - sx); in et_scroll()
236 etbcopy(fb, fb - (count * ip->cols), in et_scroll()
237 (ip->bottom_margin + 1 - sy) * ip->cols); in et_scroll()
240 etbcopy(fb, fb + (count * ip->cols), in et_scroll()
241 (ip->bottom_margin + 1 - (sy + count)) * ip->cols); in et_scroll()
244 etbcopy(fb+sx, fb+sx+count, ip->cols - (sx + count)); in et_scroll()
247 etbcopy(fb+sx, fb+sx-count, ip->cols - sx); in et_scroll()