=================================================================== RCS file: /cvs/funnyos/dev/fcons/fconsvar.h,v retrieving revision 1.5 retrieving revision 1.9 diff -u -r1.5 -r1.9 --- funnyos/dev/fcons/fconsvar.h 2007/10/16 22:04:52 1.5 +++ funnyos/dev/fcons/fconsvar.h 2008/01/11 15:36:01 1.9 @@ -1,13 +1,14 @@ /* - * $Id: fconsvar.h,v 1.5 2007/10/16 21:04:52 init Exp $ + * $Id: fconsvar.h,v 1.9 2008/01/11 15:36:01 nbrk Exp $ */ #ifndef _DEV_FCONS_FCONSVAR_H #define _DEV_FCONS_FCONSVAR_H +#include +#include #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 */ @@ -17,22 +18,30 @@ }; +struct fcons_char { + char fc_char; +// struct fcons_char *fc_next; + SIMPLEQ_ENTRY(fcons_char) fc_next; +}; + + struct fcons_dd { /* current cursor position */ - uint8_t currow; - uint8_t curcol; + uint8_t fd_currow; + uint8_t fd_curcol; - struct fcons_handle fd_fh; + /* input queue */ +// struct fcons_char *fd_iqueue; + SIMPLEQ_HEAD(head, fcons_char) fd_iqhead; + uint32_t fd_iqlength; + + 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