Remove grf_ite_ioctl(). Replace it by 'itexx_ioctl' that is configurable
per ite-type.
This commit is contained in:
parent
67384150c2
commit
b88d6013b6
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ite.c,v 1.17 1996/10/11 00:09:22 christos Exp $ */
|
||||
/* $NetBSD: ite.c,v 1.18 1996/10/11 20:50:34 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -222,7 +222,7 @@ void *auxp;
|
|||
splx(s);
|
||||
|
||||
iteinit(gp->g_itedev);
|
||||
kprintf(": rows %d cols %d", ip->rows, ip->cols);
|
||||
kprintf(": %dx%d", ip->rows, ip->cols);
|
||||
kprintf(" repeat at (%d/100)s next at (%d/100)s",
|
||||
start_repeat_timeo, next_repeat_timeo);
|
||||
|
||||
|
@ -344,7 +344,9 @@ itecnputc(dev, c)
|
|||
(void)ite_on(dev, 3);
|
||||
paniced = 1;
|
||||
}
|
||||
SUBR_CURSOR(ip, START_CURSOROPT);
|
||||
iteputchar(ch, ip);
|
||||
SUBR_CURSOR(ip, END_CURSOROPT);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -492,7 +494,6 @@ itestop(tp, flag)
|
|||
struct tty *tp;
|
||||
int flag;
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
struct tty *
|
||||
|
@ -510,13 +511,16 @@ iteioctl(dev, cmd, addr, flag, p)
|
|||
caddr_t addr;
|
||||
struct proc *p;
|
||||
{
|
||||
struct iterepeat *irp;
|
||||
struct ite_softc *ip;
|
||||
struct tty *tp;
|
||||
struct iterepeat *irp;
|
||||
struct ite_softc *ip;
|
||||
struct tty *tp;
|
||||
view_t *view;
|
||||
struct itewinsize *is;
|
||||
int error;
|
||||
|
||||
ip = getitesp(dev);
|
||||
tp = ip->tp;
|
||||
ip = getitesp(dev);
|
||||
tp = ip->tp;
|
||||
view = viewview(ip->grf->g_viewdev);
|
||||
|
||||
KDASSERT(tp);
|
||||
|
||||
|
@ -555,8 +559,22 @@ iteioctl(dev, cmd, addr, flag, p)
|
|||
start_repeat_timeo = irp->start;
|
||||
next_repeat_timeo = irp->next;
|
||||
return(0);
|
||||
case ITEIOCGWINSZ:
|
||||
is = (struct itewinsize *)addr;
|
||||
is->x = view->display.x;
|
||||
is->y = view->display.y;
|
||||
is->width = view->display.width;
|
||||
is->height = view->display.height;
|
||||
is->depth = view->bitmap->depth;
|
||||
return(0);
|
||||
case ITEIOCDSPWIN:
|
||||
ip->grf->g_mode(ip->grf, GM_GRFON, NULL, 0, 0);
|
||||
return(0);
|
||||
case ITEIOCREMWIN:
|
||||
ip->grf->g_mode(ip->grf, GM_GRFOFF, NULL, 0, 0);
|
||||
return(0);
|
||||
}
|
||||
error = ite_grf_ioctl(ip, cmd, addr, flag, p);
|
||||
error = (ip->itexx_ioctl)(ip, cmd, addr, flag, p);
|
||||
if(error >= 0)
|
||||
return(error);
|
||||
return (ENOTTY);
|
||||
|
@ -662,7 +680,7 @@ static void
|
|||
ite_switch(unit)
|
||||
int unit;
|
||||
{
|
||||
struct ite_softc *ip;
|
||||
struct ite_softc *ip;
|
||||
|
||||
if(!(ite_confunits & (1 << unit)))
|
||||
return; /* Don't try unconfigured units */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ite_cc.c,v 1.9 1996/10/11 00:09:24 christos Exp $ */
|
||||
/* $NetBSD: ite_cc.c,v 1.10 1996/10/11 20:50:36 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Leo Weppelman
|
||||
|
@ -31,9 +31,6 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "grfcc.h"
|
||||
#if NGRFCC > 0
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -56,6 +53,8 @@
|
|||
#include <atari/dev/viewioctl.h>
|
||||
#include <atari/dev/viewvar.h>
|
||||
|
||||
#include "grfcc.h"
|
||||
|
||||
/*
|
||||
* This is what ip->priv points to;
|
||||
* it contains local variables for custom-chip ites.
|
||||
|
@ -90,6 +89,8 @@ extern font_info font_info_8x16;
|
|||
|
||||
static void view_init __P((struct ite_softc *));
|
||||
static void view_deinit __P((struct ite_softc *));
|
||||
static int itecc_ioctl __P((struct ite_softc *, u_long, caddr_t, int,
|
||||
struct proc *));
|
||||
static int ite_newsize __P((struct ite_softc *, struct itewinsize *));
|
||||
static void cursor32 __P((struct ite_softc *, int));
|
||||
static void putc8 __P((struct ite_softc *, int, int, int, int));
|
||||
|
@ -337,6 +338,8 @@ register struct ite_softc *ip;
|
|||
if((cci = ip->priv) != NULL)
|
||||
return;
|
||||
|
||||
ip->itexx_ioctl = itecc_ioctl;
|
||||
|
||||
#if defined(KFONT_8X8)
|
||||
ip->font = font_info_8x8;
|
||||
#else
|
||||
|
@ -459,7 +462,7 @@ struct itewinsize *winsz;
|
|||
}
|
||||
|
||||
int
|
||||
ite_grf_ioctl(ip, cmd, addr, flag, p)
|
||||
itecc_ioctl(ip, cmd, addr, flag, p)
|
||||
struct ite_softc *ip;
|
||||
u_long cmd;
|
||||
caddr_t addr;
|
||||
|
@ -475,14 +478,6 @@ struct proc *p;
|
|||
#endif
|
||||
|
||||
switch (cmd) {
|
||||
case ITEIOCGWINSZ:
|
||||
is = (struct itewinsize *)addr;
|
||||
is->x = view->display.x;
|
||||
is->y = view->display.y;
|
||||
is->width = view->display.width;
|
||||
is->height = view->display.height;
|
||||
is->depth = view->bitmap->depth;
|
||||
break;
|
||||
case ITEIOCSWINSZ:
|
||||
is = (struct itewinsize *)addr;
|
||||
|
||||
|
@ -502,12 +497,6 @@ struct proc *p;
|
|||
iteioctl(ip->grf->g_itedev,TIOCSWINSZ,(caddr_t)&ws,0,p);
|
||||
}
|
||||
break;
|
||||
case ITEIOCDSPWIN:
|
||||
ip->grf->g_mode(ip->grf, GM_GRFON, NULL, 0, 0);
|
||||
break;
|
||||
case ITEIOCREMWIN:
|
||||
ip->grf->g_mode(ip->grf, GM_GRFOFF, NULL, 0, 0);
|
||||
break;
|
||||
case ITEIOCGBELL:
|
||||
#if 0 /* LWP */
|
||||
/* XXX This won't work now */
|
||||
|
@ -594,7 +583,8 @@ cursor32(struct ite_softc *ip, int flag)
|
|||
* draw the cursor
|
||||
*/
|
||||
cend = min(ip->curx, ip->cols-1);
|
||||
if (ip->cursorx == cend && ip->cursory == ip->cury)
|
||||
if (flag == DRAW_CURSOR
|
||||
&& ip->cursorx == cend && ip->cursory == ip->cury)
|
||||
return;
|
||||
ip->cursorx = cend;
|
||||
ip->cursory = ip->cury;
|
||||
|
@ -853,6 +843,3 @@ scrollbmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, sho
|
|||
*clr_y++ = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#error Must be defined
|
||||
#endif /* NGRFCC */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: itevar.h,v 1.5 1996/04/18 08:52:04 leo Exp $ */
|
||||
/* $NetBSD: itevar.h,v 1.6 1996/10/11 20:50:37 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman (Atari modifications)
|
||||
|
@ -93,6 +93,8 @@ struct ite_softc {
|
|||
int save_curx;
|
||||
int cury;
|
||||
int save_cury;
|
||||
int (*itexx_ioctl) __P((struct ite_softc *, u_long,
|
||||
caddr_t, int, struct proc *));
|
||||
};
|
||||
|
||||
enum ite_flags {
|
||||
|
@ -207,8 +209,6 @@ void ite_filter __P((u_int ,enum caller));
|
|||
/* ite_cc functions */
|
||||
int grfcc_cnprobe __P((void));
|
||||
void grfcc_iteinit __P((struct grf_softc *));
|
||||
int ite_grf_ioctl __P((struct ite_softc *, u_long, caddr_t, int,
|
||||
struct proc *));
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _ITEVAR_H */
|
||||
|
|
Loading…
Reference in New Issue