=================================================================== RCS file: /cvs/funnyos/dev/fcons/fconsvar.h,v retrieving revision 1.1.1.1 retrieving revision 1.7 diff -u -r1.1.1.1 -r1.7 --- funnyos/dev/fcons/fconsvar.h 2007/10/16 09:41:04 1.1.1.1 +++ funnyos/dev/fcons/fconsvar.h 2007/10/16 22:10:32 1.7 @@ -1,5 +1,5 @@ /* - * $Id: fconsvar.h,v 1.1.1.1 2007/10/16 08:41:04 init Exp $ + * $Id: fconsvar.h,v 1.7 2007/10/16 21:10:32 init Exp $ */ #ifndef _DEV_FCONS_FCONSVAR_H #define _DEV_FCONS_FCONSVAR_H @@ -7,29 +7,26 @@ #define FCONS_WIDTH 80 #define FCONS_HEIGHT 25 -#define NFCONS 1 +struct fcons_handle { + void *fh_ownerdd; /* similar to bh_ownerdd in bus_handle; XXX kill this cause it is ugly */ -struct fcons_devdata { - /* current cursor position */ - uint8_t currow; - uint8_t curcol; - + char (*getc)(void *); + void (*putc)(void *, char); }; -struct consoleops { - char (*getc)(struct device *); - void (*putc)(struct device *, char); +struct fcons_dd { + /* current cursor position */ + uint8_t fd_currow; + uint8_t fd_curcol; + + struct fcons_handle fd_fh; }; int fcons_devctl(struct device *devp, uint8_t ctl, void *data); -char fcons_getchar(struct device *devp); -void fcons_putchar(struct device *devp, char ch); - -/* XXX */ -//#define putchar(x) fcons_putchar() - +char fcons_getchar(void *ddp); +void fcons_putchar(void *ddp, char ch); /* devctl stuff */ #define DCFCONS_GETCURROW 0